我正在尝试在这里运行教程:http ://www.rengelbert.com/tutorial.php?id=175
这是 Frogger 游戏,我导入了项目并且 Java 版本运行良好,但是在运行 Android 版本时我遇到了崩溃。我对整个事情很陌生,正在寻求帮助。
这是我得到的:
12-20 17:32:01.725: E/dalvikvm(231): Could not find class 'com.rengelbert.froggergdx.FroggerGame', referenced from method com.rengelbert.froggergdx.FroggerGDX.onCreate
12-20 17:32:01.755: W/dalvikvm(231): VFY: unable to resolve new-instance 611 (Lcom/rengelbert/froggergdx/FroggerGame;) in Lcom/rengelbert/froggergdx/FroggerGDX;
12-20 17:32:01.755: D/dalvikvm(231): VFY: replacing opcode 0x22 at 0x0003
12-20 17:32:01.755: D/dalvikvm(231): Making a copy of Lcom/rengelbert/froggergdx/FroggerGDX;.onCreate code (44 bytes)
12-20 17:32:01.875: D/dalvikvm(231): Trying to load lib /data/data/com.rengelbert.froggergdx/lib/libgdx.so 0x45f3d990
12-20 17:32:01.915: D/dalvikvm(231): Added shared lib /data/data/com.rengelbert.froggergdx/lib/libgdx.so 0x45f3d990
12-20 17:32:01.915: D/dalvikvm(231): No JNI_OnLoad found in /data/data/com.rengelbert.froggergdx/lib/libgdx.so 0x45f3d990
12-20 17:32:01.949: D/AndroidRuntime(231): Shutting down VM
12-20 17:32:01.955: W/dalvikvm(231): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
12-20 17:32:01.955: E/AndroidRuntime(231): Uncaught handler: thread main exiting due to uncaught exception
12-20 17:32:01.975: E/AndroidRuntime(231): java.lang.NoClassDefFoundError: com.rengelbert.froggergdx.FroggerGame
12-20 17:32:01.975: E/AndroidRuntime(231): at com.rengelbert.froggergdx.FroggerGDX.onCreate(FroggerGDX.java:14)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.os.Handler.dispatchMessage(Handler.java:99)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.os.Looper.loop(Looper.java:123)
12-20 17:32:01.975: E/AndroidRuntime(231): at android.app.ActivityThread.main(ActivityThread.java:4363)
12-20 17:32:01.975: E/AndroidRuntime(231): at java.lang.reflect.Method.invokeNative(Native Method)
12-20 17:32:01.975: E/AndroidRuntime(231): at java.lang.reflect.Method.invoke(Method.java:521)
12-20 17:32:01.975: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
12-20 17:32:01.975: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
12-20 17:32:01.975: E/AndroidRuntime(231): at dalvik.system.NativeStart.main(Native Method)
12-20 17:32:01.995: I/dalvikvm(231): threadid=7: reacting to signal 3
12-20 17:32:01.995: E/dalvikvm(231): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
12-20 17:32:03.975: I/Process(231): Sending signal. PID: 231 SIG: 9
所以我想这是造成它的原因:12-20 17:32:01.725: E/dalvikvm(231): Could not find class 'com.rengelbert.froggergdx.FroggerGame', referenced from method com.rengelbert.froggergdx.FroggerGDX.onCreate
我在这个主题上找到了这个帖子:libgdx game not working in android devices
在进入 Java Build Class 并检查 gdx.jar 后端 jar 文件和 FroggerDesktop 文件后,我仍然遇到崩溃。
如果这些文件是依赖项,为什么在我导入项目时不会自动检查它们?我想在导入项目后,一切都应该设置好了吗?
谢谢您的帮助。