libgdx问题 - 不幸的是,我的-GDX-游戏已经停止 [英] libgdx issue - unfortunately, my-gdx-game has stopped

查看:1032
本文介绍了libgdx问题 - 不幸的是,我的-GDX-游戏已经停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以运行没有问题,我-GDX-游戏桌面Java应用程序,但似乎无法让我的-GDX-游戏Android的工作。

I can get the my-gdx-game-desktop java application running no problems but can't seem to get my-gdx-game-android to work.

我收到我的AVD不幸的是,我的-GDX-游戏已经停止的消息。

I receive the message 'unfortunately, my-gdx-game has stopped' on my AVD.

logcat的:

07-21 10:00:59.509: D/dalvikvm(791): Not late-enabling CheckJNI (already on)
07-21 10:01:00.289: D/dalvikvm(791): Trying to load lib /data/app-lib/com.mygdx.game.android-2/libgdx.so 0x416e54c0
07-21 10:01:00.310: D/dalvikvm(791): Added shared lib /data/app-lib/com.mygdx.game.android-2/libgdx.so 0x416e54c0
07-21 10:01:00.319: D/dalvikvm(791): No JNI_OnLoad found in /data/app-lib/com.mygdx.game.android-2/libgdx.so 0x416e54c0, skipping init
07-21 10:01:00.359: D/libEGL(791): Emulator without GPU support detected. Fallback to software renderer.
07-21 10:01:00.429: D/libEGL(791): loaded /system/lib/egl/libGLES_android.so
07-21 10:01:00.489: D/AndroidRuntime(791): Shutting down VM
07-21 10:01:00.509: W/dalvikvm(791): threadid=1: thread exiting with uncaught exception 
(group=0x41465700)
07-21 10:01:00.539: E/AndroidRuntime(791): FATAL EXCEPTION: main
07-21 10:01:00.539: E/AndroidRuntime(791): java.lang.RuntimeException: Unable to start 
activity ComponentInfo{com.mygdx.game.android/com.mygdx.game.android.AndroidLauncher}: com.badlogic.gdx.utils.GdxRuntimeException: Libgdx requires OpenGL ES 2.0
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
07-21 10:01:00.539: E/AndroidRuntime(791):  at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.os.Looper.loop(Looper.java:137)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.app.ActivityThread.main(ActivityThread.java:5103)
07-21 10:01:00.539: E/AndroidRuntime(791):  at java.lang.reflect.Method.invokeNative(Native Method)
07-21 10:01:00.539: E/AndroidRuntime(791):  at 
java.lang.reflect.Method.invoke(Method.java:525)
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-21 10:01:00.539: E/AndroidRuntime(791):  at dalvik.system.NativeStart.main(Native Method)
07-21 10:01:00.539: E/AndroidRuntime(791): Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Libgdx requires OpenGL ES 2.0
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.badlogic.gdx.backends.android.AndroidGraphics.createGLSurfaceView(AndroidGraphics.java:121)
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.badlogic.gdx.backends.android.AndroidGraphics.<init>(AndroidGraphics.java:101)
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.badlogic.gdx.backends.android.AndroidGraphics.<init>(AndroidGraphics.java:94)
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.badlogic.gdx.backends.android.AndroidApplication.init(AndroidApplication.java:130)
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.badlogic.gdx.backends.android.AndroidApplication.initialize(AndroidApplication.java:96)
07-21 10:01:00.539: E/AndroidRuntime(791):  at com.mygdx.game.android.AndroidLauncher.onCreate(AndroidLauncher.java:14)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.app.Activity.performCreate(Activity.java:5133)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-21 10:01:00.539: E/AndroidRuntime(791):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
07-21 10:01:00.539: E/AndroidRuntime(791):  ... 11 more

很抱歉,如果这是一个愚蠢的问题,我做的事情令人难以置信的愚蠢。正如你可能会说我是新来的编码,因此任何帮助是AP preciated!

Sorry if this is a stupid question and I'm doing something incredibly dumb. As you can probably tell I'm new to coding so any help is appreciated!

推荐答案

好像有一个与Android的API 19模拟器中的错误。如果我在API-19运行libgdx OpenGL ES 2.0的应用程序,我得到相同的异常:

It seems like there is a bug with the Android API 19 emulator. If I run a libgdx OpenGL ES 2.0 app in API-19 I get the same exception:

E/AndroidRuntime(791): Caused by: com.badlogic.gdx.utils.GdxRuntimeException: 
Libgdx requires OpenGL ES 2.0

解决方法是使用另外一个仿真器仍然有OpenGL ES 2.0的一个低一点的API级别,但没有这种恼人的错误。
为测试一个很好的选择将是Galaxy Nexus的仿真器为例API 17。对我来说,同样libgdx OpenGL ES 2.0的应用程序工作正常那里。你应该试试这个。

The workaround is to use another emulator with an a little bit lower API level that still has OpenGL ES 2.0, but doesn't have this annoying bug. A good choice for testing would be the Galaxy Nexus Emulator with API 17 for example. For me the same libgdx OpenGL ES 2.0 app worked fine there. You should give this a try.

这篇关于libgdx问题 - 不幸的是,我的-GDX-游戏已经停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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