Reputation: 151
In android studio, i'm trying to create .jar file of my library and it contains another .jar dependancies. After adding created .jar file to another project and run it gives me
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{in.co.xyz.MyLibrary/in.co.xyz.MyLibrary.MainActivity}:
java.lang.ClassNotFoundException: Didn't find class "in.co.xyz.MyLibrary.MainActivity"
on path: DexPathList[[zip file "/data/app/in.co.xyz.MyLibrary-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
how to fix this issue, please help me
Upvotes: 0
Views: 185
Reputation: 134
you cannot do this, if its must you have to include all java inside your project so that it will compile with same build.
Because .jar is container of compiled files.
Upvotes: 1