Libgdx throws an exception to the helloworld application when run in the emulator

I followed the tutorial at http://www.youtube.com/watch?v=vLx_72qxK_0&feature=player_embedded and created a simple libgdx library application that makes the application with a red background.

This works fine when I run it as a standalone desktop application, but when I launch the -android version, an exception is thrown and the application does not start.

02-04 18:25:27.536: W/dalvikvm(456): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/badlogic/gdx/backends/android/AndroidApplication; 02-04 18:25:27.536: W/dalvikvm(456): Class init failed in newInstance call (Lorg/gravity/main/GameAndroidActivity;) 02-04 18:25:27.567: D/AndroidRuntime(456): Shutting down VM 02-04 18:25:27.567: W/dalvikvm(456): threadid=1: thread exiting with uncaught exception (group=0x40015560) 02-04 18:25:27.676: E/AndroidRuntime(456): FATAL EXCEPTION: main 02-04 18:25:27.676: E/AndroidRuntime(456): java.lang.ExceptionInInitializerError 02-04 18:25:27.676: E/AndroidRuntime(456): at java.lang.Class.newInstanceImpl(Native Method) 02-04 18:25:27.676: E/AndroidRuntime(456): at java.lang.Class.newInstance(Class.java:1409) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.os.Handler.dispatchMessage(Handler.java:99) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.os.Looper.loop(Looper.java:123) 02-04 18:25:27.676: E/AndroidRuntime(456): at android.app.ActivityThread.main(ActivityThread.java:3683) 02-04 18:25:27.676: E/AndroidRuntime(456): at java.lang.reflect.Method.invokeNative(Native Method) 02-04 18:25:27.676: E/AndroidRuntime(456): at java.lang.reflect.Method.invoke(Method.java:507) 02-04 18:25:27.676: E/AndroidRuntime(456): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 02-04 18:25:27.676: E/AndroidRuntime(456): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 02-04 18:25:27.676: E/AndroidRuntime(456): at dalvik.system.NativeStart.main(Native Method) 02-04 18:25:27.676: E/AndroidRuntime(456): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gdx: findLibrary returned null 02-04 18:25:27.676: E/AndroidRuntime(456): at java.lang.Runtime.loadLibrary(Runtime.java:429) 02-04 18:25:27.676: E/AndroidRuntime(456): at java.lang.System.loadLibrary(System.java:554) 02-04 18:25:27.676: E/AndroidRuntime(456): at com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:111) 02-04 18:25:27.676: E/AndroidRuntime(456): at com.badlogic.gdx.backends.android.AndroidApplication.<clinit>(AndroidApplication.java:58) 02-04 18:25:27.676: E/AndroidRuntime(456): ... 15 more 

Does anyone have any experience with this library?

+4
source share
3 answers

fixed the problem by making sure that the armeabi and armeabi-v7a files are in the / libs of the Android project.

+6
source

I found that the problem was caused by an attempt to run on an Android Android with an Intel Atom x86 image. I believe you need to use an ARM image.

+2
source

Source: How to import x86 folders for Android (July 2013)

The developers told us that they skipped the missing x86 folder on the last night, so you should not use the ARM emulator.

So, download the last night below and copy the x86 folder to the libs/ folder of the project / library project (where you will also find the armeabi and armeabi-v7a )

Last night for libgdx containing the x86 folder to host in libs /

This solved the problem for me.

0
source

Source: https://habr.com/ru/post/1394785/


All Articles