Library is missing at runtime

I’m trying to compile a jME game using the SDK into an Android app, but it always crashes on start.

The error is:
[spoiler]E/ 5743): SEVERE Class com.gameminers.hydricon.jme.HydriconJME init failed
E/ 5743): java.lang.ClassNotFoundException: com.gameminers.hydricon.jme.HydriconJME
E/ 5743): at java.lang.Class.classForName(Native Method)
E/ 5743): at java.lang.Class.forName(
E/ 5743): at java.lang.Class.forName(
E/ 5743): at
E/ 5743): at
E/ 5743): at
E/ 5743): at
E/ 5743): at
E/ 5743): at$800(
E/ 5743): at$H.handleMessage(
E/ 5743): at android.os.Handler.dispatchMessage(
E/ 5743): at android.os.Looper.loop(
E/ 5743): at
E/ 5743): at java.lang.reflect.Method.invokeNative(Native Method)
E/ 5743): at java.lang.reflect.Method.invoke(
E/ 5743): at$
E/ 5743): at
E/ 5743): at dalvik.system.NativeStart.main(Native Method)
E/ 5743): Caused by: java.lang.NoClassDefFoundError: com.gameminers.hydricon.World
E/ 5743): at com.gameminers.hydricon.jme.HydriconJME.<clinit>(
E/ 5743): … 18 more[/spoiler]

Above it is also spam of ‘DexOpt: unable to optimize instance field ref’, and near the top is ‘VFY: unable to find class referenced in signature’

I’ve checked the generated classes.dex with dexdump, and the library is in fact missing. The library is being dexed and is in the libraries list in the project, but does not exist in the resulting apk. Compilation completes with no errors, and running the project on the development box works as well.

Please advise, I am at a loss as to what is causing this and have been trying to fix it to no avail for the past day and a half.

Try a clean&build. If that doesn’t work it might be you have to make a change in the .java file in question and save it again, on windows there seems to be an issue with file permissions that make some files “disappear” from the attention of the IDE under certain circumstances.

Still getting the same error, I edited the main Application file by adding a newline then saving it, and unset read-only on all the files in the project. I then ran a clean & build and then debug. I already have full control permissions on all of the files and the main project folder.

EDIT: We get the same issue in Android Studio if we pull in the library and jME; I also checked the dexdump output again, and even jME is missing - it seems no libraries are ending up the apk at all, even ones built-in to the SDK. I have gotten the Android test project to compile and run, so my SDK installation is good… not sure what is going on here.

We’ve solved the problem by pulling the sources for the library into the project instead of using a compiled jar.