Android应用程序立即崩溃

时间:2012-11-12 19:39:17

标签: android

    11-12 13:31:44.988: D/AndroidRuntime(13055): Shutting down VM
11-12 13:31:44.988: W/dalvikvm(13055): threadid=1: thread exiting with uncaught exception (group=0x4001d570)
11-12 13:31:45.008: E/AndroidRuntime(13055): FATAL EXCEPTION: main
11-12 13:31:45.008: E/AndroidRuntime(13055): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.StickmanRevolution/com.example.StickmanRevolution.activity.MainActivity}: java.lang.ClassNotFoundException: com.example.StickmanRevolution.activity.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.StickmanRevolution-2.apk]
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.os.Looper.loop(Looper.java:130)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.app.ActivityThread.main(ActivityThread.java:3683)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at java.lang.reflect.Method.invokeNative(Native Method)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at java.lang.reflect.Method.invoke(Method.java:507)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at dalvik.system.NativeStart.main(Native Method)
11-12 13:31:45.008: E/AndroidRuntime(13055): Caused by: java.lang.ClassNotFoundException: com.example.StickmanRevolution.activity.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.StickmanRevolution-2.apk]
11-12 13:31:45.008: E/AndroidRuntime(13055):    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-12 13:31:45.008: E/AndroidRuntime(13055):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
11-12 13:31:45.008: E/AndroidRuntime(13055):    ... 11 more

我一直试图让它工作近一个星期。我准备了很多线程,并尝试了我能找到的一切。我无法弄清楚为什么我的应用程序根本无法运行。我已经尝试了模拟器和我的Android手机。

1 个答案:

答案 0 :(得分:1)

这是你的错误:

  

11-12 13:31:45.008:E / AndroidRuntime(13055):引起:java.lang.ClassNotFoundException:com.example.StickmanRevolution.activity.MainActivity in loader dalvik.system.PathClassLoader [/ data / app / com.example.StickmanRevolution-2.apk]

Android无法找到班级com.example.StickmanRevolution.activity.MainActivity。确保您的类在正确的包中,并且名称完全匹配(包括大小写)。