我想在String中使用'switch',僅在編譯器級別1.7支持,所以Eclipse讓我升級它,然後修復我的項目屬性。從那時起,我的應用程序啓動,甚至在OnCreate被調用之前,它崩潰了。我確實知道問題在於編譯器級別,但我已將其恢復爲默認值,但仍然無效......我該怎麼辦?啓動時應用程序崩潰
謝謝!
堆棧跟蹤:
06-25 17:39:09.039: D/AndroidRuntime(265): Shutting down VM
06-25 17:39:09.049: W/dalvikvm(265): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-25 17:39:09.080: E/AndroidRuntime(265): FATAL EXCEPTION: main
06-25 17:39:09.080: E/AndroidRuntime(265): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.ronEven.iCards/com.ronEven.iCards.Main}: java.lang.ClassNotFoundException: com.ronEven.iCards.Main in loader dalvik.system.PathClassLoader[/data/app/com.ronEven.iCards-1.apk]
06-25 17:39:09.080: E/AndroidRuntime(265): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.os.Handler.dispatchMessage(Handler.java:99)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.os.Looper.loop(Looper.java:123)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-25 17:39:09.080: E/AndroidRuntime(265): at java.lang.reflect.Method.invokeNative(Native Method)
06-25 17:39:09.080: E/AndroidRuntime(265): at java.lang.reflect.Method.invoke(Method.java:521)
06-25 17:39:09.080: E/AndroidRuntime(265): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-25 17:39:09.080: E/AndroidRuntime(265): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-25 17:39:09.080: E/AndroidRuntime(265): at dalvik.system.NativeStart.main(Native Method)
06-25 17:39:09.080: E/AndroidRuntime(265): Caused by: java.lang.ClassNotFoundException: com.ronEven.iCards.Main in loader dalvik.system.PathClassLoader[/data/app/com.ronEven.iCards-1.apk]
06-25 17:39:09.080: E/AndroidRuntime(265): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
06-25 17:39:09.080: E/AndroidRuntime(265): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-25 17:39:09.080: E/AndroidRuntime(265): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-25 17:39:09.080: E/AndroidRuntime(265): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
06-25 17:39:09.080: E/AndroidRuntime(265): ... 11 more
郵政堆棧跟蹤。 – kosa
對不起,沒有問題,但怎麼樣? –
在這種情況下,這可能是您的LogCat。編碼角度下方應該有一個窗口,上面寫着「LogCat」。根據需要選擇儘可能多的條目,複製粘貼它們,然後將它們格式化爲代碼塊。 –