• <bdo id='s0SR2'></bdo><ul id='s0SR2'></ul>
    1. <small id='s0SR2'></small><noframes id='s0SR2'>

        <legend id='s0SR2'><style id='s0SR2'><dir id='s0SR2'><q id='s0SR2'></q></dir></style></legend><tfoot id='s0SR2'></tfoot>
      1. <i id='s0SR2'><tr id='s0SR2'><dt id='s0SR2'><q id='s0SR2'><span id='s0SR2'><b id='s0SR2'><form id='s0SR2'><ins id='s0SR2'></ins><ul id='s0SR2'></ul><sub id='s0SR2'></sub></form><legend id='s0SR2'></legend><bdo id='s0SR2'><pre id='s0SR2'><center id='s0SR2'></center></pre></bdo></b><th id='s0SR2'></th></span></q></dt></tr></i><div id='s0SR2'><tfoot id='s0SR2'></tfoot><dl id='s0SR2'><fieldset id='s0SR2'></fieldset></dl></div>
      2. LibGDX HelloWorld 项目在 Android 模拟器上运行时崩溃

        时间:2023-05-19

          <small id='qAkAI'></small><noframes id='qAkAI'>

          • <bdo id='qAkAI'></bdo><ul id='qAkAI'></ul>
              <tbody id='qAkAI'></tbody>

                <i id='qAkAI'><tr id='qAkAI'><dt id='qAkAI'><q id='qAkAI'><span id='qAkAI'><b id='qAkAI'><form id='qAkAI'><ins id='qAkAI'></ins><ul id='qAkAI'></ul><sub id='qAkAI'></sub></form><legend id='qAkAI'></legend><bdo id='qAkAI'><pre id='qAkAI'><center id='qAkAI'></center></pre></bdo></b><th id='qAkAI'></th></span></q></dt></tr></i><div id='qAkAI'><tfoot id='qAkAI'></tfoot><dl id='qAkAI'><fieldset id='qAkAI'></fieldset></dl></div>
              1. <legend id='qAkAI'><style id='qAkAI'><dir id='qAkAI'><q id='qAkAI'></q></dir></style></legend>
              2. <tfoot id='qAkAI'></tfoot>
                • 本文介绍了LibGDX HelloWorld 项目在 Android 模拟器上运行时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我一直试图让 Hello-World 项目作为学习 LibGDX 的一部分运行.使用夜间构建 (libgdx-nightly-20140322).但是,我变得非常沮丧,因为 hello-world-desktop 项目在作为 Java 应用程序运行时可以运行,而 hello-world-html 项目将作为 Web 应用程序运行.但是 hello-world-android simple 会产生一个描述性不强的错误:

                  I've been trying to get the Hello-World project to run as part of learning LibGDX. Using the Nightly Build (libgdx-nightly-20140322). However, I have become quite frustrated because the hello-world-desktop project will work when run as a Java Application, the hello-world-html project will Run As a Web Application. But hello-world-android simple produces a not very descriptive error:

                  我在这里查看过类似的问题,发现 Android Emulator 没有启动 LibGDX 项目?,但给出的解决方案不适用于我所拥有的.还有 libgdx 我的第一个三角形教程不起作用?,它指出我去新教程尝试,但没有用.

                  I have checked on here looking for similar problems and found Android Emulator does not launch LibGDX project?, but the solution given does not work with what I have. There was also libgdx my first triangle tutorial not working?, which pointed me to new tutorials to try, but no avail.

                  我第一次尝试遵循 GITHUB,以及第二次从零开始的游戏 LibGDX 教程 1:创建初始项目.我尝试了不同的 API 级别 8、13、16 和19.

                  The first time I attempted to follow the tutorial on GITHUB, and the second time Games from Scratch's LibGDX Tutorial 1: Creating an initial project. I have tried different API Levels 8, 13, 16, & 19.

                  这里是日志文件的转储:

                  Here is the dump of the logfile:

                  03-28 03:41:33.344: E/Trace(622): error opening trace file: No such file or directory (2)
                  03-28 03:41:33.435: D/dalvikvm(622): Trying to load lib /data/data/com.me.mygdxgame/lib/libgdx.so 0x411e9590
                  03-28 03:41:33.445: D/dalvikvm(622): Added shared lib /data/data/com.me.mygdxgame/lib/libgdx.so 0x411e9590
                  03-28 03:41:33.445: D/dalvikvm(622): No JNI_OnLoad found in /data/data/com.me.mygdxgame/lib/libgdx.so 0x411e9590, skipping init
                  03-28 03:41:33.465: D/libEGL(622): Emulator without GPU support detected. Fallback to software renderer.
                  03-28 03:41:33.496: D/libEGL(622): loaded /system/lib/egl/libGLES_android.so
                  03-28 03:41:33.535: D/AndroidRuntime(622): Shutting down VM
                  03-28 03:41:33.535: W/dalvikvm(622): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
                  03-28 03:41:33.555: E/AndroidRuntime(622): FATAL EXCEPTION: main
                  03-28 03:41:33.555: E/AndroidRuntime(622): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.me.mygdxgame/com.me.mygdxgame.MainActivity}: java.lang.RuntimeException: Libgdx requires OpenGL ES 2.0
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.os.Handler.dispatchMessage(Handler.java:99)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.os.Looper.loop(Looper.java:137)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.ActivityThread.main(ActivityThread.java:4745)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at java.lang.reflect.Method.invokeNative(Native Method)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at java.lang.reflect.Method.invoke(Method.java:511)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at dalvik.system.NativeStart.main(Native Method)
                  03-28 03:41:33.555: E/AndroidRuntime(622): Caused by: java.lang.RuntimeException: Libgdx requires OpenGL ES 2.0
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at com.badlogic.gdx.backends.android.AndroidGraphics.createGLSurfaceView(AndroidGraphics.java:118)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at com.badlogic.gdx.backends.android.AndroidGraphics.<init>(AndroidGraphics.java:90)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at com.badlogic.gdx.backends.android.AndroidApplication.initialize(AndroidApplication.java:97)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at com.me.mygdxgame.MainActivity.onCreate(MainActivity.java:15)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.Activity.performCreate(Activity.java:5008)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
                  03-28 03:41:33.555: E/AndroidRuntime(622):  ... 11 more
                  

                  推荐答案

                  正如@Sid 在评论中指出的那样,错误表明 LibGDX 需要 OpenGL ES 2.0 支持.模拟器的软件渲染器不支持 OpenGL ES 2.0.

                  As @Sid notes in the comments, the error says LibGDX requires OpenGL ES 2.0 support. The emulator's software renderer does not support OpenGL ES 2.0.

                  您可以通过在模拟器中启用图形加速来让您的模拟器支持.请参阅 http://developer.android.com/tools/devices/emulator.html#accel-graphics 和 Android OpenGL ES 2.0 模拟器

                  You may be able to get your emulator to support by enabling graphics acceleration in the emulator. See http://developer.android.com/tools/devices/emulator.html#accel-graphics and Android OpenGL ES 2.0 emulator

                  这是突出显示设置的 Android 虚拟设备管理器对话框.启用此功能绝对可以解决 Macbook Air 以及许多其他计算机上的问题.

                  Here is the Android Virtual Device Manager dialog with the setting highlighted. Enabling this definitely solves the problem on a Macbook Air, and likely many other computers.

                  这篇关于LibGDX HelloWorld 项目在 Android 模拟器上运行时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 LibGDX And​​roid 项目中实施 AdMob 广告? 下一篇:libgdx ScissorStack 未按预期工作

                  相关文章

                  最新文章

                  <legend id='3ejK1'><style id='3ejK1'><dir id='3ejK1'><q id='3ejK1'></q></dir></style></legend>

                • <small id='3ejK1'></small><noframes id='3ejK1'>

                      <i id='3ejK1'><tr id='3ejK1'><dt id='3ejK1'><q id='3ejK1'><span id='3ejK1'><b id='3ejK1'><form id='3ejK1'><ins id='3ejK1'></ins><ul id='3ejK1'></ul><sub id='3ejK1'></sub></form><legend id='3ejK1'></legend><bdo id='3ejK1'><pre id='3ejK1'><center id='3ejK1'></center></pre></bdo></b><th id='3ejK1'></th></span></q></dt></tr></i><div id='3ejK1'><tfoot id='3ejK1'></tfoot><dl id='3ejK1'><fieldset id='3ejK1'></fieldset></dl></div>

                        <bdo id='3ejK1'></bdo><ul id='3ejK1'></ul>
                    1. <tfoot id='3ejK1'></tfoot>