Android - "Class Not Found"

Hey guys, :slight_smile:
I was trying to run one of my projects on my android device. Unfortunately, I get this error message:

W/dalvikvm( 4382): VFY: rejected Lcom/destroflyer/roblocks/application/MainApplication;.loadSettings ()V W/dalvikvm( 4382): Verifier rejected class Lcom/destroflyer/roblocks/application/MainApplication; E/com.jme3.app.AndroidHarness( 4382): SEVERE Class com.destroflyer.roblocks.application.MainApplication init failed E/com.jme3.app.AndroidHarness( 4382): java.lang.ClassNotFoundException: com.destroflyer.roblocks.application.MainApplication E/com.jme3.app.AndroidHarness( 4382): at java.lang.Class.classForName(Native Method) E/com.jme3.app.AndroidHarness( 4382): at java.lang.Class.forName(Class.java:217) E/com.jme3.app.AndroidHarness( 4382): at java.lang.Class.forName(Class.java:172) E/com.jme3.app.AndroidHarness( 4382): at com.jme3.app.AndroidHarness.onCreate(AndroidHarness.java:223) E/com.jme3.app.AndroidHarness( 4382): at android.app.Activity.performCreate(Activity.java:5008) E/com.jme3.app.AndroidHarness( 4382): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) E/com.jme3.app.AndroidHarness( 4382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) E/com.jme3.app.AndroidHarness( 4382): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) E/com.jme3.app.AndroidHarness( 4382): at android.app.ActivityThread.access$600(ActivityThread.java:130) E/com.jme3.app.AndroidHarness( 4382): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) E/com.jme3.app.AndroidHarness( 4382): at android.os.Handler.dispatchMessage(Handler.java:99) E/com.jme3.app.AndroidHarness( 4382): at android.os.Looper.loop(Looper.java:137) E/com.jme3.app.AndroidHarness( 4382): at android.app.ActivityThread.main(ActivityThread.java:4745) E/com.jme3.app.AndroidHarness( 4382): at java.lang.reflect.Method.invokeNative(Native Method) E/com.jme3.app.AndroidHarness( 4382): at java.lang.reflect.Method.invoke(Method.java:511) E/com.jme3.app.AndroidHarness( 4382): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) E/com.jme3.app.AndroidHarness( 4382): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/com.jme3.app.AndroidHarness( 4382): at dalvik.system.NativeStart.main(Native Method) E/com.jme3.app.AndroidHarness( 4382): Caused by: java.lang.VerifyError: com/destroflyer/roblocks/application/MainApplication E/com.jme3.app.AndroidHarness( 4382): ... 18 more
The according MainActivity: [java]public MainActivity(){ // Set the application class to run appClass = "com.destroflyer.roblocks.application.MainApplication"; // Try ConfigType.FASTEST; or ConfigType.LEGACY if you have problems eglConfigType = ConfigType.BEST; // Exit Dialog title & message exitDialogTitle = "Exit?"; exitDialogMessage = "Press Yes"; // Enable verbose logging eglConfigVerboseLogging = false; // Choose screen orientation screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; // Invert the MouseEvents X (default = true) mouseEventsInvertX = true; // Invert the MouseEvents Y (default = true) mouseEventsInvertY = true; }[/java]

The class MainApplication is there and executable on desktop - I even created another class AndroidTest in the same package (blue box test code) which works fine when adapting the appClass attribute. So I guess the project is building fine, but somehow Android finds only one of those two classes…

Yours, destro :slight_smile:

EDIT: I tried to comment out every fancy code in the MainApplication to make sure the ClassNotFound-error is actually an ClassNotFound-error. But even with no executed code (only a black screen as application), it doesn’t work.

EDIT2: The MainActivity is actually in com.destroflyer.roblocks and not com.destroflyer.roblocks.application (as MainApplication), if this should be a problem.