I have created a library (aar) in Android Studio that includes some utility methods that rely on Joda Time classes. I am using the dependency from jcenter with the following line of code in my gradle file
compile 'joda-time:joda-time:2.9.4'
I then added my library to a private maven repository and created a new Android project and added my library to it from this repo.
When I try to use my library's methods in the new project I get the following error:-
java.lang.NoClassDefFoundError: org.joda.time.DateTime
I tried going back to my library and instead of including joda time via jcenter I added the .jar file directly to my 'libs' folder and this time when I tried the methods in my new project they worked and I didn't get the above error.
Does this mean that dependencies are not actually compiled into the aar file when included from jcenter? Is there a way to do so?