I’m stuck on an android project using libgdx.
My desktop project works perfectly.
My android project contains the libs folder containing armeabi and armeabi-v7a and the android gdx backends.
Activity is declared in manifest
I’m used to using these tools.
Everything used to work perfectly and all the sudden I am facing a persistent error (after project fixing, cleaning, restarting, redownloading the libs, trying different api, sdk levels, jdk…).
Here is the Log of the error
06-05 03:28:38.953: I/dalvikvm(5312): Failed resolving
Lcom/badlogic/gdx/backends/android/AndroidApplication; interface 73 'Lcom/badlogic/gdx/Application;'
06-05 03:28:38.963: W/dalvikvm(5312): Link of class 'Lcom/badlogic/gdx/backends/android/AndroidApplication;' failed
06-05 03:28:38.963: W/dalvikvm(5312): Unable to resolve superclass of Lcom/me/example/Example_RLActivity; (94)
06-05 03:28:38.963: W/dalvikvm(5312): Link of class 'Lcom/me/example/Example_RLActivity;' failed
06-05 03:28:38.963: D/AndroidRuntime(5312): Shutting down VM
06-05 03:28:38.963: W/dalvikvm(5312): threadid=1: thread exiting with uncaught exception (group=0x409fb338)
06-05 03:28:38.963: E/AndroidRuntime(5312): FATAL EXCEPTION: main
06-05 03:28:38.963: E/AndroidRuntime(5312): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.me.example/com.me.example.Example_RLActivity}: java.lang.ClassNotFoundException: com.me.example.Example_RLActivity
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.access$600(ActivityThread.java:123)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.os.Handler.dispatchMessage(Handler.java:99)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.os.Looper.loop(Looper.java:137)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.main(ActivityThread.java:4424)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.reflect.Method.invokeNative(Native Method)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.reflect.Method.invoke(Method.java:511)
06-05 03:28:38.963: E/AndroidRuntime(5312): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
06-05 03:28:38.963: E/AndroidRuntime(5312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
06-05 03:28:38.963: E/AndroidRuntime(5312): at dalvik.system.NativeStart.main(Native Method)
06-05 03:28:38.963: E/AndroidRuntime(5312): Caused by: java.lang.ClassNotFoundException: com.me.example.Example_RLActivity
06-05 03:28:38.963: E/AndroidRuntime(5312): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
06-05 03:28:38.963: E/AndroidRuntime(5312): ... 11 more
I hope some of you might have faced the problem and solved it!
Thanks in advance for your help
Sounds like the Android r17 upgrade bug. See the badlogic blog for the work-around: http://www.badlogicgames.com/wordpress/?p=2362
Basically, you need to explicitly tag the libGDX jar files as “exported” jars from the Android project.