title: Cannot override abstract method of superclass when subclass is in another package
body: <p>I have this <strong>public abstract class MyClass</strong> with abstract method <strong>abstract public void myMethod()</strong> in my Android library project.</p>
  
  <p>I am trying to build a concrete implementation of this class in another project, which is an application project and references the library project. The method implementation in the subclass is marked with "@Override" and Eclipse gives me the following error:</p>
  
  <blockquote>
    <p>The method myMethod() of type MySubClass must override or implement a
    supertype method</p>
  </blockquote>
  
  <p>I remove "@Override" and error becomes a warning:</p>
  
  <blockquote>
    <p>The method MySubClass.myMethod() does not override the inherited
    method from MyClass since it is private to a different package</p>
  </blockquote>
  
  <p>What does this mean? Yes, these classes are in different projects and different packages but what does this have to do with inheritance? Both methods are public.</p>
  
  <p>Here is the code for the superclass:</p>
  
  <pre><code>package com.emret.myPackage;
  
  //Some imports here
  
  public abstract class ThingsProvider {
  
  //Class code here
  
      abstract public void createThings();
  
  }
  </code></pre>
  
  <p>Here is the subclass:</p>
  
  <pre><code>package com.emret.myPackage.subPackage;
  
  //Some imports here
  
  public class SmallThingsProvider extends ThingsProvider {
  
  //Class code here
  
      @Override
      public void createThings() {
          createThing(0, R.drawable.cat, R.raw.cat);
          createThing(1, R.drawable.dog, R.raw.dog);
          createThing(2, R.drawable.cow, R.raw.cow);
          createThing(3, R.drawable.sheep, R.raw.goat);
          createThing(4, R.drawable.bicycle, R.raw.bicycle);
      }
  }
  </code></pre>