当我的笔记本电脑死亡时,我丢失了所有代码。没有复苏的希望。从备份重建我的应用程序后,除了强制关闭,我什么都没有,没有错误。我尝试过研究和阅读日志。
logcat的:
10-05 04:01:09.858: W/dalvikvm(4257): threadid=1: thread exiting with uncaught exception (group=0x4001d560)
10-05 04:01:09.858: E/AndroidRuntime(4257): FATAL EXCEPTION: main
10-05 04:01:09.858: E/AndroidRuntime(4257): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hyperspacemg.showstopper/com.hyperspacemg.showstopper.MainActivity}: java.lang.NullPointerException
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.os.Handler.dispatchMessage(Handler.java:99)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.os.Looper.loop(Looper.java:130)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.app.ActivityThread.main(ActivityThread.java:3835)
10-05 04:01:09.858: E/AndroidRuntime(4257): at java.lang.reflect.Method.invokeNative(Native Method)
10-05 04:01:09.858: E/AndroidRuntime(4257): at java.lang.reflect.Method.invoke(Method.java:507)
10-05 04:01:09.858: E/AndroidRuntime(4257): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
10-05 04:01:09.858: E/AndroidRuntime(4257): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
10-05 04:01:09.858: E/AndroidRuntime(4257): at dalvik.system.NativeStart.main(Native Method)
10-05 04:01:09.858: E/AndroidRuntime(4257): Caused by: java.lang.NullPointerException
10-05 04:01:09.858: E/AndroidRuntime(4257): at com.hyperspacemg.showstopper.MainActivity.onCreate(MainActivity.java:131)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-05 04:01:09.858: E/AndroidRuntime(4257): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
10-05 04:01:09.858: E/AndroidRuntime(4257): ... 11 more
如果您需要我的代码让我知道,StackOverflow说我有太多的代码要发布...
答案 0 :(得分:0)
它仍然是从GUI中删除的代码,但仍留在活动中。删除与Null值“side”相关的所有代码(我在第284行错过了一些)修复了它。
答案 1 :(得分:-1)
请关闭其他项目并清理项目。这将解决它。