Android Emulator not starting LibGDX project?

Whenever I try to run the application on the emulator, the emulator displays the error message "Sorry, My libGDX Game has stopped." However, the application works fine in the desktop version.

I have the latest nightly version, ADT version 18, the latest version of GWT and the latest version of eclipse. My Android SDK is version 19, and my Android SDK is version 11.

Any ideas on how to fix this?

I followed this guide: LibGDX Tutorial

Here is a screenshot of what I see: Emulator screenshots

Logcat:

06-10 19:50:44.282: I/Process(1548): Sending signal. PID: 1548 SIG: 9 06-10 19:50:48.022: I/dalvikvm(1566): threadid=3: reacting to signal 3 06-10 19:50:48.152: I/dalvikvm(1566): Wrote stack traces to '/data/anr/traces.txt' 06-10 19:50:48.312: W/dalvikvm(1566): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/badlogic/gdx/backends/android/AndroidApplication; 06-10 19:50:48.312: W/dalvikvm(1566): Class init failed in newInstance call (Lcom/me/mygdxgame/MainActivity;) 06-10 19:50:48.322: D/AndroidRuntime(1566): Shutting down VM 06-10 19:50:48.332: W/dalvikvm(1566): threadid=1: thread exiting with uncaught exception (group=0xb40d5180) 06-10 19:50:48.392: E/AndroidRuntime(1566): FATAL EXCEPTION: main 06-10 19:50:48.392: E/AndroidRuntime(1566): java.lang.ExceptionInInitializerError 06-10 19:50:48.392: E/AndroidRuntime(1566): at java.lang.Class.newInstanceImpl(Native Method) 06-10 19:50:48.392: E/AndroidRuntime(1566): at java.lang.Class.newInstance(Class.java:1319) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.app.ActivityThread.access$600(ActivityThread.java:123) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.os.Handler.dispatchMessage(Handler.java:99) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.os.Looper.loop(Looper.java:137) 06-10 19:50:48.392: E/AndroidRuntime(1566): at android.app.ActivityThread.main(ActivityThread.java:4424) 06-10 19:50:48.392: E/AndroidRuntime(1566): at java.lang.reflect.Method.invokeNative(Native Method) 06-10 19:50:48.392: E/AndroidRuntime(1566): at java.lang.reflect.Method.invoke(Method.java:511) 06-10 19:50:48.392: E/AndroidRuntime(1566): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 06-10 19:50:48.392: E/AndroidRuntime(1566): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 06-10 19:50:48.392: E/AndroidRuntime(1566): at dalvik.system.NativeStart.main(Native Method) 06-10 19:50:48.392: E/AndroidRuntime(1566): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gdx: findLibrary returned null 06-10 19:50:48.392: E/AndroidRuntime(1566): at java.lang.Runtime.loadLibrary(Runtime.java:365) 06-10 19:50:48.392: E/AndroidRuntime(1566): at java.lang.System.loadLibrary(System.java:535) 06-10 19:50:48.392: E/AndroidRuntime(1566): at com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:116) 06-10 19:50:48.392: E/AndroidRuntime(1566): at com.badlogic.gdx.backends.android.AndroidApplication.<clinit>(AndroidApplication.java:59) 06-10 19:50:48.392: E/AndroidRuntime(1566): ... 15 more 06-10 19:50:49.152: I/dalvikvm(1566): threadid=3: reacting to signal 3 06-10 19:50:49.192: I/dalvikvm(1566): Wrote stack traces to '/data/anr/traces.txt' 06-10 19:50:49.972: I/dalvikvm(1566): threadid=3: reacting to signal 3 06-10 19:50:50.012: I/dalvikvm(1566): Wrote stack traces to '/data/anr/traces.txt' 06-10 19:50:52.093: I/dalvikvm(1566): threadid=3: reacting to signal 3 06-10 19:50:52.112: I/dalvikvm(1566): Wrote stack traces to '/data/anr/traces.txt' 
+5
android android-emulator libgdx
source share
2 answers

If this is an ARM-based emulator, you forgot to add the armeabi and armeabi-v7a files to your Android project folder / folder. Please follow the installation instructions here: http://code.google.com/p/libgdx/wiki/ProjectSetupNew

If this is an X86 based emulator, ̶ THEN ̶t̶h̶e̶r̶e̶'̶s̶ I'm afraid there is no solution for this problem ̶y̶e̶t̶.̶ we are not compiling for ANDROID X86 Currently ̶m̶o̶m̶e̶n̶t̶.̶

Now Edit.- x86 is supported

+14
source share

If it doesn’t work on the device, try the following: android-project → properties → java Build path → Order and export Click on the project you have contacted (your simple Java project or working project) and press the "Up" button until it will not be at the top. Make sure it is marked with a [V]. I also did this with jars, just in case, and now it works on my device. I am still getting the same error on my x86 VM because libgdx does not support x86 Android devices.

0
source share

All Articles