I got this crash report from many users.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.*appname*/com.unity3d.player.UnityPlayerActivity}: java.lang.ClassNotFoundException: Didn't find class "com.unity3d.player.UnityPlayerActivity" on path: /mnt/asec/com.*appname*-1/pkg.apk
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2229)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
at android.app.ActivityThread.access$700(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5455)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1209)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.unity3d.player.UnityPlayerActivity" on path: /mnt/asec/com.*appname*-1/pkg.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2220)
... 11 more
Anyone have any idea what to do?
Never used unity3d... also I don't know what's in your gradle files, so can't really say unless you give more information. However, you could try cleaning your project and rebuilding it. Go to Build -> Clean Project or use gradlew clean if you are comfortable with the command line.
Related
I have got a problem involving ClassNotFoundException. When i "Run as
android application" from eclipse it works fine, but when i download
it from Google Play (same source code but "Exported as signed app") it
crashes with the following stacktrace:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.xxxx.xxxxxx./com.xxxx.xxxxxx..SplashActivity}:
java.lang.ClassNotFoundException: Didn't find class
"com.xxxx.xxxxxx..SplashActivity" on path: DexPathList[[zip
file
"/mnt/asec/com.xxxx.xxxxxx.-1/pkg.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]] at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2277)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
at android.app.ActivityThread.access$600(ActivityThread.java:165) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:107) at
android.os.Looper.loop(Looper.java:194) at
android.app.ActivityThread.main(ActivityThread.java:5391) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:525) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at
dalvik.system.NativeStart.main(Native Method) Caused by:
java.lang.ClassNotFoundException: Didn't find class
"com.xxxx.xxxxxx..SplashActivity" on path: DexPathList[[zip
file
"/mnt/asec/com.xxxx.xxxxxx.-1/pkg.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]] at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501) at
java.lang.ClassLoader.loadClass(ClassLoader.java:461) at
android.app.Instrumentation.newActivity(Instrumentation.java:1123) at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
... 11 more
Try Cleaning the project and export it once more to google play.
I updated an app in goolge play store with a new version.Now if app open then Application class not found exception occurs.
App works fine if the apk install directly .But not from play store.
Crash analytics report says
java.lang.RuntimeException: Unable to instantiate application com.xxx.xx.GetJsonArrayFromChannelUrl: java.lang.ClassNotFoundException: Didn't find class "com.xxx.xxx.GetJsonArrayFromChannelUrl" on path: /data/app/com.xx.xx-2.apk
at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4584)
at android.app.ActivityThread.access$1400(ActivityThread.java:158)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5365)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxxx.fetchdata.GetJsonArrayFromChannelUrl" on path: /data/app/com.xx.xx-2.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newApplication(Instrumentation.java:985)
at android.app.LoadedApk.makeApplication(LoadedApk.java:499)
Follow these steps.
Clean your libraries
Right click on project > Android Tools > Fix Project properties
Project > Clean
When I run my app directly from Android Developer Tools (ADT), it works fine. However, when I export it to an APK file and install it, I get the following error:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{my.app/my.app.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "my.app.MainActivity" on path: DexPathList[[zip file "/data/app/my.app-2.apk"],nativeLibraryDirectories=[/data/app-lib/my.app-2, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2187)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2311)
at android.app.ActivityThread.access$600(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5214)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "my.app.MainActivity" on path: DexPathList[[zip file "/data/app/my.app-2.apk"],nativeLibraryDirectories=[/data/app-lib/my.app-2, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2178)
... 11 more
The problem seemed to be a bug in ADT. Manually doing a clean via Project -> Clean and then re-exporting the APK fixed the problem.
I got a strange crash in my app and the new Analytics from inside Google-Play-Services - this bug seems to be really rare, but I really would like to know what is going on there.
java.lang.RuntimeException: Unable to instantiate receiver com.google.analytics.tracking.android.AnalyticsReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.analytics.tracking.android.AnalyticsReceiver" on path: /mnt/asec/org.ligi.passandroid-1/pkg.apk
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2375)
at android.app.ActivityThread.access$1500(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5095)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.analytics.tracking.android.AnalyticsReceiver" on path: /mnt/asec/org.ligi.passandroid-1/pkg.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2370)
... 10 more
I am getting class not found exception on some android devices, it's happening only on some devices.
This is the call-stack i have got,
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.picframes.android/com.picframes.android.first}: java.lang.ClassNotFoundException: com.picframes.android.first
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2240)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:4987)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.picframes.android.first
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
Any suggestions for resolving this problem, I could not reproduce this problem on my device.
On devices with which android version program works and where it doesn't work? I am not sure if this is the case but you probably get this error on older devices, is that right? You should make sure that all the functionality of your program is available on older systems. Use your manifest file:
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
to define minimum sdk version, and you will get errors in your code if you are trying to use features that are not available on the device that you target.