問題描述
每次通過 Eclipse 重新安裝時,都會出現以下異常.每次我重新安裝當前處于前臺的應用程序時都會發生這種情況.
I get the following exception every time I reinstall my through eclipse. It happens every time I reinstall an app that is currently in the foreground.
我希望這個錯誤只會在開發過程中發生,因為我會通過 Eclipse 卸載正在運行的應用程序.
I expect that this error is only happening during development because I cause an uninstallation of a running app through Eclipse.
有人在用戶手機上看到過這個錯誤嗎?
Has anybody seen this error on user phones?
當我切換到帶有 ICS 的 Galaxy Nexus 時,這開始發生在我身上.
This started happening for me as I switched to a Galaxy Nexus with ICS.
02-22 11:31:07.098: E/AndroidRuntime(479): FATAL EXCEPTION: main
02-22 11:31:07.098: E/AndroidRuntime(479): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.LoadedApk.makeApplication(LoadedApk.java:466)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3260)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.ActivityThread.access$2200(ActivityThread.java:117)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.os.Handler.dispatchMessage(Handler.java:99)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.os.Looper.loop(Looper.java:123)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-22 11:31:07.098: E/AndroidRuntime(479): at java.lang.reflect.Method.invokeNative(Native Method)
02-22 11:31:07.098: E/AndroidRuntime(479): at java.lang.reflect.Method.invoke(Method.java:507)
02-22 11:31:07.098: E/AndroidRuntime(479): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-22 11:31:07.098: E/AndroidRuntime(479): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-22 11:31:07.098: E/AndroidRuntime(479): at dalvik.system.NativeStart.main(Native Method)
02-22 11:31:07.098: E/AndroidRuntime(479): Caused by: java.lang.NullPointerException
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:346)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.LoadedApk.getClassLoader(LoadedApk.java:291)
02-22 11:31:07.098: E/AndroidRuntime(479): at android.app.LoadedApk.makeApplication(LoadedApk.java:458)
02-22 11:31:07.098: E/AndroidRuntime(479): ... 11 more
在上面的日志中,我沒有找到任何與我的應用程序相關的東西.但它仍然崩潰.
In the above logs i didn't find any thing related to my application. But still it's crashing.
誰能告訴我這是什么原因?這是 Galaxy Nexus 上冰淇淋三明治中的錯誤嗎?
Can any one tell me what's the reason for this? Is this a bug in Ice Cream Sandwich of on the Galaxy Nexus?
推薦答案
我遇到了這個問題,當 XML 中的某些地方出錯時,也許你只需要重新生成你的 R.java
i got this problem when someting in XML is wrong, maybe you just have to regenerate your R.java
這篇關于通過 Eclipse 安裝時,Android 應用程序崩潰的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!