Paul S
Paul S

Reputation: 279

Android intermittent class not found run time exception

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?

Thanks

Paul

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: Unable to instantiate activity 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 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2753) at android.app.ActivityThread.access$2500(ActivityThread.java:129) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2107) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:143) at android.app.ActivityThread.main(ActivityThread.java:4701) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: com.android.app.app.app in loader dalvik.system.PathClassLoader[/mnt/asec/my,app.app.app-1/pkg.apk] at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at java.lang.ClassLoader.loadClass(ClassLoader.java:532) at android.app.Instrumentation.newActivity(Instrumentation.java:1021) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2651) ... 11 more

Upvotes: 5

Views: 2492

Answers (1)

Femi
Femi

Reputation: 64700

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 

in your stack trace above: is /mnt/asec the SD card storage path on the device?

Upvotes: 2

Related Questions