I'm trying to create a plugin for a java library (in .jar file) to Phonegap users. Currently, my plugin connects two methods from my library: one that uses network operations and writing to device memory and one that runs a new activity.
The one that uses network works, no problem. However, the one that runs a new activity fails in run-time with the NoClassDef.. error.
Classically, this error comes from either not declaring an activity in the manifest or from the class actually not being there (i.e., problematic build, etc..)
Post compilation & build with phonegap, i can see two things: 1) my activity is defined in the final manifest (with correct path) 2) the class is present (inside the .jar) - also, the rest of the classes from my jar can be found to be running in the stack of the error.
I'm really lost as to what directions to explore, i'm running out of ideas. Any suggestions? If you need more info let me know i'll post it up here.
- I'm running the latest phonegap through npm (downloaded two days ago)
- Work is done on a macintosh
- The jar i'm trying to translate is working 100% under any other circumstance.
- The java code in the jar is accessible since method 1 works & method 2 starts running until it tries to start an activity.
- Phonegap build produces no errors (i'm running on verbose)
- I'm testing on a nexus 5 Lollipop
- The jar is inside the final build
- I believe the activity is declared in the final build's manifest (my apkTool doesn't smoothly show the manifest as it fails completing its process)
Any help would be welcome, hoping it's not a duplicate as i've done quite a research.