Android Emulator does not launch LibGDX project?(Android Emulator 不启动 LibGDX 项目?)
问题描述
Whenever i try to execute the application on the emulator, the emulator displays an error saying "Unfortunately, My libGDX Game has stopped." The application runs fine in the desktop version though.
I have the latest nightly version, ADT version 18, latest GWT, and latest version of eclipse. My Android SDK tools is version 19, while my android SDK platform-tools is version 11.
Any ideas on how to fix this?
I was following along this tutorial: LibGDX tutorial
Here is a screenshot of what i see:
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'
If this is an ARM based emulator, you forgot to add the armeabi and armeabi-v7a folders to your Android project's libs/ folder. Please follow the setup guide here: http://code.google.com/p/libgdx/wiki/ProjectSetupNew
I̶f̶ ̶t̶h̶i̶s̶ ̶i̶s̶ ̶a̶n̶ ̶x̶8̶6̶ ̶b̶a̶s̶e̶d̶ ̶e̶m̶u̶l̶a̶t̶o̶r̶,̶ ̶t̶h̶e̶n̶ ̶i̶'̶m̶ ̶a̶f̶r̶a̶i̶d̶ ̶t̶h̶e̶r̶e̶'̶s̶ ̶n̶o̶ ̶s̶o̶l̶u̶t̶i̶o̶n̶ ̶f̶o̶r̶ ̶t̶h̶i̶s̶ ̶i̶s̶s̶u̶e̶ ̶y̶e̶t̶.̶ ̶W̶e̶ ̶d̶o̶ ̶n̶o̶t̶ ̶c̶o̶m̶p̶i̶l̶e̶ ̶f̶o̶r̶ ̶A̶n̶d̶r̶o̶i̶d̶ ̶x̶8̶6̶ ̶a̶t̶ ̶t̶h̶e̶ ̶m̶o̶m̶e̶n̶t̶.̶
Edit.- x86 is now supported
这篇关于Android Emulator 不启动 LibGDX 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android Emulator 不启动 LibGDX 项目?
基础教程推荐
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01