Summary: If we include a native Android project as library to our Android module environment and try to access the library's functionality, it throws NoClassFoundException if the UI elements are built using XML layouts.
Work Around: Build the UI components using Widgets ( java ). This is a laborious process as native android projects are built using layouts in xml.
Steps to reproduce:
1. Import the attached 'Sample-apklib.zip' to Eclipse/Studio
2. Build the project as a library ( jar file is generated in bin folder )
3. Import the attached 'Sample_apklib_module.zip' to Eclipse/Studio.
4. Add the jar file obtained in Step 2 in the build path of Sample_apklib_module project. Also copy the jar file to 'lib' folder of the module project.
5. Build and run the module using ant scripts.
6. Exception is seen as UI elements in library is referenced in the module.
Work Around: All UI elements should be created using native java methods ( widgets ).