不幸的是Android应用关闭了

时间:2013-08-09 19:46:33

标签: android

我正在使用带有libGdx框架的eclipse ...并且一切都已设置......但只有当我在启动时通过模拟器运行android时,当我点击应用程序图标时它会给我一条消息" UNFORTUNATELY APP-NAME已停止" ...请告诉我为什么会发生这种情况...因为当我通过Eclipse运行Desktop java Application时,相同的代码也可以工作...请帮帮我...谢谢......

LOG CAT DETAILS:

08-09 19:30:45.729: W/dalvikvm(747): Unable to resolve superclass of Lcom/badlogic/drop/MainActivity; (20)
08-09 19:30:45.739: W/dalvikvm(747): Link of class 'Lcom/badlogic/drop/MainActivity;' failed
08-09 19:30:45.759: D/AndroidRuntime(747): Shutting down VM
08-09 19:30:45.759: W/dalvikvm(747): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
08-09 19:30:45.779: E/AndroidRuntime(747): FATAL EXCEPTION: main
08-09 19:30:45.779: E/AndroidRuntime(747): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.badlogic.drop/com.badlogic.drop.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.badlogic.drop.MainActivity" on path: /data/app/com.badlogic.drop-2.apk
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.os.Handler.dispatchMessage(Handler.java:99)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.os.Looper.loop(Looper.java:137)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.app.ActivityThread.main(ActivityThread.java:5041)
08-09 19:30:45.779: E/AndroidRuntime(747):  at java.lang.reflect.Method.invokeNative(Native Method)
08-09 19:30:45.779: E/AndroidRuntime(747):  at java.lang.reflect.Method.invoke(Method.java:511)
08-09 19:30:45.779: E/AndroidRuntime(747):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
08-09 19:30:45.779: E/AndroidRuntime(747):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
08-09 19:30:45.779: E/AndroidRuntime(747):  at dalvik.system.NativeStart.main(Native Method)
08-09 19:30:45.779: E/AndroidRuntime(747): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.badlogic.drop.MainActivity" on path: /data/app/com.badlogic.drop-2.apk
08-09 19:30:45.779: E/AndroidRuntime(747):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
08-09 19:30:45.779: E/AndroidRuntime(747):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
08-09 19:30:45.779: E/AndroidRuntime(747):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
08-09 19:30:45.779: E/AndroidRuntime(747):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
08-09 19:30:45.779: E/AndroidRuntime(747):  ... 11 more
08-09 19:35:53.845: I/Process(747): Sending signal. PID: 747 SIG: 9
08-09 19:37:20.125: E/Trace(958): error opening trace file: No such file or directory (2)
08-09 19:37:20.225: W/dalvikvm(958): Unable to resolve superclass of Lcom/badlogic/drop/MainActivity; (20)
08-09 19:37:20.255: W/dalvikvm(958): Link of class 'Lcom/badlogic/drop/MainActivity;' failed
08-09 19:37:20.265: D/AndroidRuntime(958): Shutting down VM
08-09 19:37:20.265: W/dalvikvm(958): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
08-09 19:37:20.306: E/AndroidRuntime(958): FATAL EXCEPTION: main
08-09 19:37:20.306: E/AndroidRuntime(958): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.badlogic.drop/com.badlogic.drop.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.badlogic.drop.MainActivity" on path: /data/app/com.badlogic.drop-2.apk
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.os.Handler.dispatchMessage(Handler.java:99)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.os.Looper.loop(Looper.java:137)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.app.ActivityThread.main(ActivityThread.java:5041)
08-09 19:37:20.306: E/AndroidRuntime(958):  at java.lang.reflect.Method.invokeNative(Native Method)
08-09 19:37:20.306: E/AndroidRuntime(958):  at java.lang.reflect.Method.invoke(Method.java:511)
08-09 19:37:20.306: E/AndroidRuntime(958):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
08-09 19:37:20.306: E/AndroidRuntime(958):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
08-09 19:37:20.306: E/AndroidRuntime(958):  at dalvik.system.NativeStart.main(Native Method)
08-09 19:37:20.306: E/AndroidRuntime(958): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.badlogic.drop.MainActivity" on path: /data/app/com.badlogic.drop-2.apk
08-09 19:37:20.306: E/AndroidRuntime(958):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
08-09 19:37:20.306: E/AndroidRuntime(958):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
08-09 19:37:20.306: E/AndroidRuntime(958):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
08-09 19:37:20.306: E/AndroidRuntime(958):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
08-09 19:37:20.306: E/AndroidRuntime(958):  ... 11 more
08-09 19:37:24.495: I/Process(958): Sending signal. PID: 958 SIG: 9

1 个答案:

答案 0 :(得分:3)

您似乎重命名了mainactivity类,但没有更新Android清单。