I've created a library to be released as an aar
. In this library I'm using Facebook Stetho
so in my library dependencies I'm using:
compile "com.facebook.stetho:stetho:1.4.1"
I've also added the following lines to my library proguard file:
-keep class com.facebook.stetho.** { *; }
-dontwarn com.facebook.stetho.**
After the aar
is generated I'm incorporating it on a app using Android Studio File -> New Module -> Import .JAR/.AAR so
compile project(':MyTestProject')
Is added to the app build.gradle
file.
When I run the app, the app crashes with the log
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/stetho/Stetho;
....
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.stetho.Stetho" on path:.....
If I add the compile "com.facebook.stetho:stetho:1.4.1"
dependency to the app build.gradle is working as expected.
Any idea why?