Android模拟器无法启动LibGDX项目? [英] Android Emulator does not launch LibGDX project?

查看:233
本文介绍了Android模拟器无法启动LibGDX项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我试图执行应用程序的仿真器,仿真器显示错误说:不幸的是,我的libGDX游戏已经停止。该应用程序虽然运行正常的桌面版本。

我有最新的nightly版本,ADT版本18,最新的GWT和Eclipse的最新版本。我的Andr​​oid SDK工具的版本是19,而我的Andr​​oid SDK平台的工具是11版

在如何解决这一问题的任何想法?

我在下面沿着这个教程: LibGDX教程

下面是我所看到的截图:

logcat的:

  06-10 19:50:44.282:I /过程(1548):发送信号。 PID:1548 SIG:9
06-10 19:50:48.022的:I / dalvikvm(1566):主题ID = 3:反应以信号3
06-10 19:50:48.152:I / dalvikvm(1566):写的堆栈跟踪到/data/anr/traces.txt
06-10 19:50:48.312:W / dalvikvm(1566):异常Ljava /朗/的UnsatisfiedLinkError;扔在初始化LCOM / badlogic / GDX /后端/安卓/ AndroidApplication;
06-10 19:50:48.312:W / dalvikvm(1566):在通话的newInstance类初始化失败(LCOM / ME / mygdxgame / MainActivity;)
06-10 19:50:48.322:D / AndroidRuntime(1566):关闭虚拟机
06-10 19:50:48.332:W / dalvikvm(1566):主题ID = 1:螺纹退出与未捕获的异常(组= 0xb40d5180)
06-10 19:50:48.392:E / AndroidRuntime(1566):致命异常:主要
06-10 19:50:48.392:E / AndroidRuntime(1566):java.lang.ExceptionInInitializerError
06-10 19:50:48.392:E / AndroidRuntime(1566):在java.lang.Class.newInstanceImpl(本机方法)
06-10 19:50:48.392:E / AndroidRuntime(1566):在java.lang.Class.newInstance(Class.java:1319)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.app.Instrumentation.newActivity(Instrumentation.java:1023)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.app.ActivityThread.access $ 600(ActivityThread.java:123)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1147)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.os.Handler.dispatchMessage(Handler.java:99)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.os.Looper.loop(Looper.java:137)
06-10 19:50:48.392:E / AndroidRuntime(1566):在android.app.ActivityThread.main(ActivityThread.java:4424)
06-10 19:50:48.392:E / AndroidRuntime(1566):在java.lang.reflect.Method.invokeNative(本机方法)
06-10 19:50:48.392:E / AndroidRuntime(1566):在java.lang.reflect.Method.invoke(Method.java:511)
06-10 19:50:48.392:E / AndroidRuntime(1566):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:784)
06-10 19:50:48.392:E / AndroidRuntime(1566):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-10 19:50:48.392:E / AndroidRuntime(1566):在dalvik.system.NativeStart.main(本机方法)
06-10 19:50:48.392:E / AndroidRuntime(1566):致:java.lang.UnsatisfiedLinkError中:无法加载GDX:findLibrary返回null
06-10 19:50:48.392:E / AndroidRuntime(1566):在java.lang.Runtime.loadLibrary(Runtime.java:365)
06-10 19:50:48.392:E / AndroidRuntime(1566):在java.lang.System.loadLibrary(System.java:535)
06-10 19:50:48.392:E / AndroidRuntime(1566):在com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:116)
06-10 19:50:48.392:E / AndroidRuntime(1566):在com.badlogic.gdx.backends.android.AndroidApplication< clinit>(AndroidApplication.java:59)
06-10 19:50:48.392:E / AndroidRuntime(1566):15 ...更多
06-10 19:50:49.152:I / dalvikvm(1566):主题ID = 3:反应信号3
06-10 19:50:49.192:I / dalvikvm(1566):写的堆栈跟踪到/data/anr/traces.txt
06-10 19:50:49.972的:I / dalvikvm(1566):主题ID = 3:反应以信号3
06-10 19:50:50.012:I / dalvikvm(1566):写的堆栈跟踪到/data/anr/traces.txt
06-10 19:50:52.093的:I / dalvikvm(1566):主题ID = 3:反应以信号3
06-10 19:50:52.112:I / dalvikvm(1566):写的堆栈跟踪到/data/anr/traces.txt
 

解决方案

如果这是一个基于ARM的模拟器,你忘了的armeabi和armeabi-V7A文件夹添加到您的Andr​​oid项目库/文件夹中。请按照安装向导的位置:<一href="http://$c$c.google.com/p/libgdx/wiki/ProjectSetupNew">http://$c$c.google.com/p/libgdx/wiki/ProjectSetupNew

如果这是一个基于x86模拟器,那么恐怕是对这个问题还没有解决方案。我们不编译为Android x86的时刻。

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

If this is an x86 based emulator, then i'm afraid there's no solution for this issue yet. We do not compile for Android x86 at the moment.

这篇关于Android模拟器无法启动LibGDX项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆