通过 Eclipse 安装时,Android 应用程序崩溃

Android App is crashing when installing through Eclipse(通过 Eclipse 安装时,Android 应用程序崩溃)

本文介绍了通过 Eclipse 安装时,Android 应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次通过 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 应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:通过 Eclipse 安装时,Android 应用程序崩溃

基础教程推荐