I'm developing SDK which uses 3 libraries that are developed by myself. I used to work with Eclipse, so I had 4 projects: 1 for the SDK and 3 for the libraries. Each one of the 3 was marked as a library and as a result a jar files was created inside the bin folder of this project. In the SDK project I added the jars to the build path and everything worked correctly.
After moving to AndroidStudio I created a new Project with 4 modules: 1 module for the SDK and 3 for each library. I put inside the build.gradle file of each module a code which create a jar from the class files ( using this question ). Inside the build.gradle of the SDK I put dependency to these jars files, but in runtime I get ClassNotFoundException.
I unzipped the jars and it looks like the class that wasn't found placed in the correct place (same libraries path). I took the jars and tried to import them in Eclipse but again I got the same error message during runtime. I performed additional test: Inside the SDK code I tried to use the class, so I declared a variable of the class that throws the exception and there was no compile error and the import was with the same path of the exception.
Note: I tried to load the class using reflection during runtime.
Do you have any idea what is wrong in the process or any better suggestions how to achieve the same behaviour?
Thanks.
Aucun commentaire:
Enregistrer un commentaire