问题描述
我的一两个用户在尝试运行我的应用程序时遇到上述类未找到运行时异常.
One or two of my users experience the above class not found run time exception when trying to run my app.
这怎么会发生,我该如何解决?是不是安装不好?
How can that happen and how can I fix it? Is it a bad install?
谢谢
保罗
通过 Android Publishers 网站收到的堆栈跟踪.我自己无法复制这个.(com.android.app.app.app) 是清单中定义的应用/活动的名称.
Stack trace received through Android Publishers site. I cannot replicate this myself.(com.android.app.app.app) is the name of the app/activity as defined in the manifest.
java.lang.RuntimeException: 无法实例化活动组件信息{my,app.app.app/com.android.app.app.app}:java.lang.ClassNotFoundException:加载程序中的 com.android.app.app.appdalvik.system.PathClassLoader[/mnt/asec/my,app.app.app-1/pkg.apk]在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2659)在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2753)在android.app.ActivityThread.access$2500(ActivityThread.java:129)在android.app.ActivityThread$H.handleMessage(ActivityThread.java:2107)在android.os.Handler.dispatchMessage(Handler.java:99)在android.os.Looper.loop(Looper.java:143)在android.app.ActivityThread.main(ActivityThread.java:4701)在java.lang.reflect.Method.invokeNative(Native方法)在java.lang.reflect.Method.invoke(Method.java:521)在com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)在dalvik.system.NativeStart.main(Native方法)引起:java.lang.ClassNotFoundException:加载程序中的 com.android.app.app.appdalvik.system.PathClassLoader[/mnt/asec/my,app.app.app-1/pkg.apk]在dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)在java.lang.ClassLoader.loadClass(ClassLoader.java:573)在java.lang.ClassLoader.loadClass(ClassLoader.java:532)在android.app.Instrumentation.newActivity(Instrumentation.java:1021)在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2651)... 11 更多
推荐答案
我会检查这些用户是否在 SD 卡上安装应用程序:如果应用程序已安装,应用程序图标可能会在应用程序列表中可见(因为它存储在设备上)但如果 SD 卡不可用(移除或可能安装以供 PC 通过 USB 读取)当用户点击应用程序图标时,加载尝试将失败.你会注意到:
I'd check to see if these users are installing the app on an SD card: if the app is installed the app icon might be visible in the application list (since that is stored on-device) but if the SD card is unavailable (removed or maybe mounted for reading by a PC over USB) when the user taps the application icon the attempts to load will fail. You will notice:
ComponentInfo{my,app.app.app/com.android.app.app.app}: java.lang.ClassNotFoundException: com.android.app.app.app in loader dalvik.system.PathClassLoader[/mnt/asec/my,app.app.app-1/pkg.apk] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2659) at
在上面的堆栈跟踪中:/mnt/asec
是设备上的 SD 卡存储路径吗?
in your stack trace above: is /mnt/asec
the SD card storage path on the device?
这篇关于Android 间歇性类未找到运行时异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!