0

I created a library in Android Studio (aar) and have successfully imported it into another application I have created. In the library, I have a base abstract class which I extend from in order to make the class that I want to use in my new application. In my application, I am successful in calling methods in the library's child class but it doesn't seem to have access to the methods in the base abstract class.

Library

AbstractClass {
    public void methodAbstractClass();
}

ChildClass extends AbstractClass {
    public void methodChildMethod();
}

MainApplication

  import ChildClass;

  MainApplication {
     public void doWork() {
       methodChildMethod(); // Works
       methodAbstractClass(); // Does not work, not visible
     }
  }

Am I missing something? Do I need to add overriding calls in my ChildClass class in the library so that the application can access methods in the AbstractClass class?

Zoe
  • 27,060
  • 21
  • 118
  • 148
Pich
  • 55
  • 1
  • 4

1 Answers1

0

Might be that you're only importing the ChildClass.

imorsi
  • 346
  • 1
  • 11
  • Good call. I opened up the .aar library I created and I found that I was not including the AbstractClass objects, just the ChildClass. It seems I am not exporting everything I need to when creating the aar file. – Pich Dec 22 '14 at 20:21