gpt4 book ai didi

java - libGDX 不会在 android 上运行

转载 作者:行者123 更新时间:2023-11-29 21:56:48 24 4
gpt4 key购买 nike

我已根据本教程完成所有操作:http://steigert.blogspot.cz/2012/02/1-libgdx-tutorial-introduction.html .一切都可以正常编译,但在启动 android 应用程序后崩溃。这是日志猫输出:

10-23 18:33:34.128: E/dalvikvm(386): Could not find class 'cz.pohy.tyrian.Tyrian', referenced from method cz.pohy.tyrian_android_tut.MainActivity.onCreate
10-23 18:33:34.128: W/dalvikvm(386): VFY: unable to resolve new-instance 1100 (Lcz/pohy/tyrian/Tyrian;) in Lcz/pohy/tyrian_android_tut/MainActivity;
10-23 18:33:34.128: D/dalvikvm(386): VFY: replacing opcode 0x22 at 0x0004
10-23 18:33:34.168: D/dalvikvm(386): VFY: dead code 0x0006-000c in Lcz/pohy/tyrian_android_tut/MainActivity;.onCreate (Landroid/os/Bundle;)V
10-23 18:33:34.188: D/dalvikvm(386): Trying to load lib /data/data/cz.pohy.tyrian_android_tut/lib/libgdx.so 0x40514fa8
10-23 18:33:34.208: D/dalvikvm(386): Added shared lib /data/data/cz.pohy.tyrian_android_tut/lib/libgdx.so 0x40514fa8
10-23 18:33:34.208: D/dalvikvm(386): No JNI_OnLoad found in /data/data/cz.pohy.tyrian_android_tut/lib/libgdx.so 0x40514fa8, skipping init
10-23 18:33:34.248: D/AndroidRuntime(386): Shutting down VM
10-23 18:33:34.248: W/dalvikvm(386): threadid=1: thread exiting with uncaught exception (group=0x40015560)
10-23 18:33:34.268: E/AndroidRuntime(386): FATAL EXCEPTION: main
10-23 18:33:34.268: E/AndroidRuntime(386): java.lang.NoClassDefFoundError: cz.pohy.tyrian.Tyrian
10-23 18:33:34.268: E/AndroidRuntime(386): at cz.pohy.tyrian_android_tut.MainActivity.onCreate(MainActivity.java:16)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.os.Handler.dispatchMessage(Handler.java:99)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.os.Looper.loop(Looper.java:123)
10-23 18:33:34.268: E/AndroidRuntime(386): at android.app.ActivityThread.main(ActivityThread.java:3683)
10-23 18:33:34.268: E/AndroidRuntime(386): at java.lang.reflect.Method.invokeNative(Native Method)
10-23 18:33:34.268: E/AndroidRuntime(386): at java.lang.reflect.Method.invoke(Method.java:507)
10-23 18:33:34.268: E/AndroidRuntime(386): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-23 18:33:34.268: E/AndroidRuntime(386): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-23 18:33:34.268: E/AndroidRuntime(386): at dalvik.system.NativeStart.main(Native Method)
10-23 18:33:40.878: I/Process(386): Sending signal. PID: 386 SIG: 9

最佳答案

在同一教程的第 10 步,他提到了 ADT 插件版本 17 的 ClassNotFoundException 错误。有解决问题的说明:

http://steigert.blogspot.com.br/2012/04/10-libgdx-tutorial-accelerator-and.html

关于java - libGDX 不会在 android 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13037107/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com