问题描述
有关我的Android应用程序,我得到了谷歌Play的开发者控制台以下错误:
For my Android application, I get the following error in Google Play's developer console:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{PACKAGE_NAME/PACKAGE_NAME.MainActivity}: java.lang.ClassNotFoundException: PACKAGE_NAME.MainActivity in loader dalvik.system.PathClassLoader[/mnt/asec/PACKAGE_NAME-1/pkg.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3693)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: PACKAGE_NAME.MainActivity in loader dalvik.system.PathClassLoader[/mnt/asec/PACKAGE_NAME-1/pkg.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
虽然这个错误出现极为罕见(和大概可以忽略不计),我觉得更清洁有一个无差错的开发者控制台:),此外,我只是想知道原因这个错误。
Although this error appears extremely rarely (and can probably be neglected), I find it cleaner to have a error-free developer console :) And furthermore, I would just like to know the causes for this error.
是的,它好像有不能被发现的一类。但为什么?我怎样才能prevent呢?的
推荐答案
在进一步的研究,我相信你是正确的事实,它绝对是一个用户错误。该 [/ MNT / ASEC / PACKAGE_NAME-1 / pkg.apk]
很可能意味着他们正试图以您的应用程序移动到SD卡。请阅读这里:
Update(4/26/15):
After further research I believe you are right in the fact that its definitely a user error. The [/mnt/asec/PACKAGE_NAME-1/pkg.apk]
most likely means they are trying to move your app to the SD card. Please read here:
Android间歇类未找到运行时异常
Android:无法实例活动/ ClassNotFoundException的
这是一个Java的RuntimeException所看到的logcat的。我见过这种情况发生很多次,当我还没有加入活动,以正确体现了。
This is a Java RuntimeException as seen by Logcat. I've seen this happen many times before when I have not added the Activity to manifest correctly.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{PACKAGE_NAME/PACKAGE_NAME.MainActivity}: java.lang.ClassNotFoundException: PACKAGE_NAME.MainActivity in loader dalvik.system.PathClassLoader[/mnt/asec/PACKAGE_NAME-1/pkg.apk]
这篇关于如何解决抛出java.lang.ClassNotFoundException在ActivityThread.performLaunchActivity?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!