Fixed
Status Update
Comments
xa...@android.com <xa...@android.com>
ka...@gmail.com <ka...@gmail.com> #2
First of all, sorry for my poor english.
I really agree.
My app crashes only in cetain phone even if the build number is same!
09-23 11:05:53.718: E 754 Parcel Class not found when unmarshalling: com.samilcts.mpaio.data.Receipt
09-23 11:05:53.718: E 754 Parcel java.lang.ClassNotFoundException: com.samilcts.mpaio.data.Receipt
09-23 11:05:53.718: E 754 Parcel at java.lang.Class.classForName(Native Method)
09-23 11:05:53.718: E 754 Parcel at java.lang.Class.forName(Class.java:251)
09-23 11:05:53.718: E 754 Parcel at java.lang.Class.forName(Class.java:216)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readParcelableCreator(Parcel.java:2133)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readParcelable(Parcel.java:2097)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readValue(Parcel.java:2013)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
09-23 11:05:53.718: E 754 Parcel at android.os.Bundle.unparcel(Bundle.java:249)
09-23 11:05:53.718: E 754 Parcel at android.os.Bundle.getString(Bundle.java:1118)
09-23 11:05:53.718: E 754 Parcel at android.content.Intent.getStringExtra(Intent.java:4991)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1394)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1026)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3984)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3887)
09-23 11:05:53.718: E 754 Parcel at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:159)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2576)
09-23 11:05:53.718: E 754 Parcel at android.os.Binder.execTransact(Binder.java:404)
09-23 11:05:53.718: E 754 Parcel at dalvik.system.NativeStart.run(Native Method)
09-23 11:05:53.718: E 754 Parcel Caused by: java.lang.NoClassDefFoundError: com/samilcts/mpaio/data/Receipt
09-23 11:05:53.718: E 754 Parcel ... 18 more
09-23 11:05:53.718: E 754 Parcel Caused by: java.lang.ClassNotFoundException: Didn't find class "com.samilcts.mpaio.data.Receipt" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
09-23 11:05:53.718: E 754 Parcel at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
09-23 11:05:53.718: E 754 Parcel at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
09-23 11:05:53.718: E 754 Parcel at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
09-23 11:05:53.718: E 754 Parcel ... 18 more
I really agree.
My app crashes only in cetain phone even if the build number is same!
09-23 11:05:53.718: E 754 Parcel Class not found when unmarshalling: com.samilcts.mpaio.data.Receipt
09-23 11:05:53.718: E 754 Parcel java.lang.ClassNotFoundException: com.samilcts.mpaio.data.Receipt
09-23 11:05:53.718: E 754 Parcel at java.lang.Class.classForName(Native Method)
09-23 11:05:53.718: E 754 Parcel at java.lang.Class.forName(Class.java:251)
09-23 11:05:53.718: E 754 Parcel at java.lang.Class.forName(Class.java:216)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readParcelableCreator(Parcel.java:2133)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readParcelable(Parcel.java:2097)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readValue(Parcel.java:2013)
09-23 11:05:53.718: E 754 Parcel at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
09-23 11:05:53.718: E 754 Parcel at android.os.Bundle.unparcel(Bundle.java:249)
09-23 11:05:53.718: E 754 Parcel at android.os.Bundle.getString(Bundle.java:1118)
09-23 11:05:53.718: E 754 Parcel at android.content.Intent.getStringExtra(Intent.java:4991)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1394)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1026)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3984)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3887)
09-23 11:05:53.718: E 754 Parcel at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:159)
09-23 11:05:53.718: E 754 Parcel at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2576)
09-23 11:05:53.718: E 754 Parcel at android.os.Binder.execTransact(Binder.java:404)
09-23 11:05:53.718: E 754 Parcel at dalvik.system.NativeStart.run(Native Method)
09-23 11:05:53.718: E 754 Parcel Caused by: java.lang.NoClassDefFoundError: com/samilcts/mpaio/data/Receipt
09-23 11:05:53.718: E 754 Parcel ... 18 more
09-23 11:05:53.718: E 754 Parcel Caused by: java.lang.ClassNotFoundException: Didn't find class "com.samilcts.mpaio.data.Receipt" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
09-23 11:05:53.718: E 754 Parcel at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
09-23 11:05:53.718: E 754 Parcel at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
09-23 11:05:53.718: E 754 Parcel at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
09-23 11:05:53.718: E 754 Parcel ... 18 more
ma...@gmail.com <ma...@gmail.com> #3
I also see the same few reports (usually after an update) and users sometimes complain with bad reviews about it too.
java.lang.RuntimeException: Unable to instantiate applicationcom.mindmeapp.alarmpad.App : java.lang.ClassNotFoundException: Didn't find class "com.mindmeapp.alarmpad.App " on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:507)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mindmeapp.alarmpad.App " on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:502)
... 11 more
java.lang.RuntimeException: Unable to instantiate application
at android.app.LoadedApk.makeApplication(LoadedApk.java:507)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:502)
... 11 more
al...@google.com <al...@google.com> #4
An "operating system" that can't handle properly installing apps?
Hope it's not that, but rather crazy green aliens from outer space... :)
Hope it's not that, but rather crazy green aliens from outer space... :)
ga...@gmail.com <ga...@gmail.com> #5
It happens when the other sisutation.( not only "Google Play" problem)
In my case, this issue came out when it pass the custom parcelable array between the activities.
I have two phone that same android version(4.4.2).
And testing my app,
it is occurred at the one. but it does not occurred at the other phone.
In my case, this issue came out when it pass the custom parcelable array between the activities.
I have two phone that same android version(4.4.2).
And testing my app,
it is occurred at the one. but it does not occurred at the other phone.
lu...@gmail.com <lu...@gmail.com> #6
Wait, using a custom parcelable and not being able to unparcel it (e.g. when restoring a fragment) gives the parcelable class name in the call stack, and mostly happens on 2.* device (Android 4.* sets the class loader on bundles).
So it looks like a different issue.
So it looks like a different issue.
ma...@gmail.com <ma...@gmail.com> #7
I have a very similar issue. The class specificaaly Click extends application in this case. Runs fine from eclipse in VM or on multiple devices but crashes with this error 100% of the time when downloaded from playstore.
java.lang.RuntimeException: Unable to instantiate application com.ClickApp.click.ClickApp: java.lang.ClassNotFoundException: Didn't find class "com.ClickApp.click.ClickApp" on path: DexPathList[[zip file "/data/app/com.ClickApp.click-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ClickApp.click-1, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:524)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4701)
at android.app.ActivityThread.access$1600(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5473)
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:854)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ClickApp.click.ClickApp" on path: DexPathList[[zip file "/data/app/com.ClickApp.click-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ClickApp.click-1, /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.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:519)
... 11 more
java.lang.RuntimeException: Unable to instantiate application com.ClickApp.click.ClickApp: java.lang.ClassNotFoundException: Didn't find class "com.ClickApp.click.ClickApp" on path: DexPathList[[zip file "/data/app/com.ClickApp.click-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ClickApp.click-1, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:524)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4701)
at android.app.ActivityThread.access$1600(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5473)
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:854)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ClickApp.click.ClickApp" on path: DexPathList[[zip file "/data/app/com.ClickApp.click-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ClickApp.click-1, /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.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:519)
... 11 more
al...@google.com <al...@google.com> #8
Just got this on a Nexus 5 with 5.0.1 (LRX22C).
First time I'm seeing this myself, during development, as opposed to user reports from Google Play.
The class is there, has been for years and years. Just re-starting the app from its launcher icon (without a reinstall) worked fine, no exception this time.
How in the world can an "operating system" lose track of some of application components?
How in the world can a bug like this go unfixed for so long?
I really hope this report isn't ignored for a couple of years and then marked "obsolete" when Android 6.0 is released.
Please.
The output of "adb bugreport" is attached.
---
01-10 02:06:55.721 E/AndroidRuntime(21610): FATAL EXCEPTION: main
01-10 02:06:55.721 E/AndroidRuntime(21610): Process: org.kman.AquaMail, PID: 21610
01-10 02:06:55.721 E/AndroidRuntime(21610): java.lang.RuntimeException: Unable to instantiate application org.kman.AquaMail.core.AquaMailApplication: java.lang.ClassNotFoundException: Didn't find class "org.kman.AquaMail.core.AquaMailApplication" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread.access$1500(ActivityThread.java:144)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.os.Handler.dispatchMessage(Handler.java:102)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.os.Looper.loop(Looper.java:135)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread.main(ActivityThread.java:5221)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.reflect.Method.invoke(Native Method)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.reflect.Method.invoke(Method.java:372)
01-10 02:06:55.721 E/AndroidRuntime(21610): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
01-10 02:06:55.721 E/AndroidRuntime(21610): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
01-10 02:06:55.721 E/AndroidRuntime(21610): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.kman.AquaMail.core.AquaMailApplication" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-10 02:06:55.721 E/AndroidRuntime(21610): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.Instrumentation.newApplication(Instrumentation.java:979)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
01-10 02:06:55.721 E/AndroidRuntime(21610): ... 10 more
01-10 02:06:55.721 E/AndroidRuntime(21610): Suppressed: java.lang.ClassNotFoundException: org.kman.AquaMail.core.AquaMailApplication
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.Class.classForName(Native Method)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
01-10 02:06:55.721 E/AndroidRuntime(21610): ... 13 more
01-10 02:06:55.721 E/AndroidRuntime(21610): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
01-10 02:06:55.728 W/asset ( 740): Asset path /data/app/org.kman.AquaMail-2/base.apk is neither a directory nor file (type=1).
First time I'm seeing this myself, during development, as opposed to user reports from Google Play.
The class is there, has been for years and years. Just re-starting the app from its launcher icon (without a reinstall) worked fine, no exception this time.
How in the world can an "operating system" lose track of some of application components?
How in the world can a bug like this go unfixed for so long?
I really hope this report isn't ignored for a couple of years and then marked "obsolete" when Android 6.0 is released.
Please.
The output of "adb bugreport" is attached.
---
01-10 02:06:55.721 E/AndroidRuntime(21610): FATAL EXCEPTION: main
01-10 02:06:55.721 E/AndroidRuntime(21610): Process: org.kman.AquaMail, PID: 21610
01-10 02:06:55.721 E/AndroidRuntime(21610): java.lang.RuntimeException: Unable to instantiate application org.kman.AquaMail.core.AquaMailApplication: java.lang.ClassNotFoundException: Didn't find class "org.kman.AquaMail.core.AquaMailApplication" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread.access$1500(ActivityThread.java:144)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.os.Handler.dispatchMessage(Handler.java:102)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.os.Looper.loop(Looper.java:135)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.ActivityThread.main(ActivityThread.java:5221)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.reflect.Method.invoke(Native Method)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.reflect.Method.invoke(Method.java:372)
01-10 02:06:55.721 E/AndroidRuntime(21610): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
01-10 02:06:55.721 E/AndroidRuntime(21610): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
01-10 02:06:55.721 E/AndroidRuntime(21610): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.kman.AquaMail.core.AquaMailApplication" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-10 02:06:55.721 E/AndroidRuntime(21610): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.Instrumentation.newApplication(Instrumentation.java:979)
01-10 02:06:55.721 E/AndroidRuntime(21610): at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
01-10 02:06:55.721 E/AndroidRuntime(21610): ... 10 more
01-10 02:06:55.721 E/AndroidRuntime(21610): Suppressed: java.lang.ClassNotFoundException: org.kman.AquaMail.core.AquaMailApplication
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.Class.classForName(Native Method)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
01-10 02:06:55.721 E/AndroidRuntime(21610): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
01-10 02:06:55.721 E/AndroidRuntime(21610): ... 13 more
01-10 02:06:55.721 E/AndroidRuntime(21610): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
01-10 02:06:55.728 W/asset ( 740): Asset path /data/app/org.kman.AquaMail-2/base.apk is neither a directory nor file (type=1).
al...@google.com <al...@google.com> #9
Looks like a duplicate of 56296
al...@google.com <al...@google.com> #10
I'm seeing this too when passing a parcelable in a bundle from the Application context to an Activity. I've solved it by setting the class loader on the parcel before trying to extract the parcelable. For example, in my GlobalState
public class GlobalState extends Application {
...
// _profile is: public class Profile implements Parcelable
// this uses a service to send the profile object in a bundle to
// result receivers in activities
Topics.dispatchProfileUpdated(GlobalState.this, _profile);
...
}
in the receiver I have
parcel.setClassLoader(getContext().getClassLoader());
_profile = parcel.getParcelable(Topics.TOPIC_PROFILE_PARAM_PROFILE);
public class GlobalState extends Application {
...
// _profile is: public class Profile implements Parcelable
// this uses a service to send the profile object in a bundle to
// result receivers in activities
Topics.dispatchProfileUpdated(GlobalState.this, _profile);
...
}
in the receiver I have
parcel.setClassLoader(getContext().getClassLoader());
_profile = parcel.getParcelable(Topics.TOPIC_PROFILE_PARAM_PROFILE);
al...@google.com <al...@google.com> #11
Same issue reported on Android 5.0 version, any solution provided by android development team?
ka...@gmail.com <ka...@gmail.com> #12
I can reproduce it with almost 100% RR with these steps:
1) Open a screen with map fragment
2) Scroll the map constantly
3) While scrolling, update application (install using adb).
In real life this step happens when automatic update starts
4) Observe the crash "Unable to instantiate application" at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:409)
Android 5.1, N5.
Activity manager throws warning:
Force removing ActivityRecord{2175709e u0 <cut>MapActivity t5094}: app died, no saved state
Unable to retrieve gids
android.content.pm.PackageManager$NameNotFoundException:com.asda.android
at android.app.ApplicationPackageManager.getPackageGids(ApplicationPackageManager.java:193)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:2930)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:2883)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:2768)
at com.android.server.am.ActivityStackSupervisor.startSpecificActivityLocked(ActivityStackSupervisor.java:1292)
at com.android.server.am.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:1891)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1455)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1438)
at com.android.server.am.ActivityStack.finishCurrentActivityLocked(ActivityStack.java:2807)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2736)
at com.android.server.am.ActivityStack.forceStopPackageLocked(ActivityStack.java:3853)
at com.android.server.am.ActivityStackSupervisor.forceStopPackageLocked(ActivityStackSupervisor.java:2419)
at com.android.server.am.ActivityManagerService.forceStopPackageLocked(ActivityManagerService.java:5659)
at com.android.server.am.ActivityManagerService.access$400(ActivityManagerService.java:238)
at com.android.server.am.ActivityManagerService$MainHandler.handleMessage(ActivityManagerService.java:1556)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Spurious death for ProcessRecord{15de531 14790:com.asda.android/u0a204 }, curProc for 14790: null
I hope this will help to fix this ancient crash. And yes, it is not "obsolete".
1) Open a screen with map fragment
2) Scroll the map constantly
3) While scrolling, update application (install using adb).
In real life this step happens when automatic update starts
4) Observe the crash "Unable to instantiate application" at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:409)
Android 5.1, N5.
Activity manager throws warning:
Force removing ActivityRecord{2175709e u0 <cut>MapActivity t5094}: app died, no saved state
Unable to retrieve gids
android.content.pm.PackageManager$NameNotFoundException:
at android.app.ApplicationPackageManager.getPackageGids(ApplicationPackageManager.java:193)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:2930)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:2883)
at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:2768)
at com.android.server.am.ActivityStackSupervisor.startSpecificActivityLocked(ActivityStackSupervisor.java:1292)
at com.android.server.am.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:1891)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1455)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1438)
at com.android.server.am.ActivityStack.finishCurrentActivityLocked(ActivityStack.java:2807)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2736)
at com.android.server.am.ActivityStack.forceStopPackageLocked(ActivityStack.java:3853)
at com.android.server.am.ActivityStackSupervisor.forceStopPackageLocked(ActivityStackSupervisor.java:2419)
at com.android.server.am.ActivityManagerService.forceStopPackageLocked(ActivityManagerService.java:5659)
at com.android.server.am.ActivityManagerService.access$400(ActivityManagerService.java:238)
at com.android.server.am.ActivityManagerService$MainHandler.handleMessage(ActivityManagerService.java:1556)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Spurious death for ProcessRecord{15de531 14790:
I hope this will help to fix this ancient crash. And yes, it is not "obsolete".
e....@gmail.com <e....@gmail.com> #13
There is a new scenario in 5.0+ involving WebView.
Since WebView implementation is now a separate component and gets updates via Play -- it may happen to be in the process of getting updated at the same time as the user is (unknowingly) trying to use WebView in an app.
The result is the app crashing (and of course it's the app, not Android, getting the blame).
I have crash logs from Play Developer Console, and would be happy to post them if needed (if there is any interest... so far, seems like there is none... would be glad to be wrong about it).
Since WebView implementation is now a separate component and gets updates via Play -- it may happen to be in the process of getting updated at the same time as the user is (unknowingly) trying to use WebView in an app.
The result is the app crashing (and of course it's the app, not Android, getting the blame).
I have crash logs from Play Developer Console, and would be happy to post them if needed (if there is any interest... so far, seems like there is none... would be glad to be wrong about it).
[Deleted User] <[Deleted User]> #16
This is happening for the latest Marshmallow updates on a Nexus 5. Three updates in a row my app has crashed. Android System Webview also doesn't automatically install on any of the phones I've experienced this with following an update, unless it takes days. This is garbage.
xa...@android.com <xa...@android.com> #17
Pretty clear this is a race condition between something starting the app and it getting re-installed. I've seen a logcat around the crash. You can see Android getting a request to start a receiver (although it can happen with other components of course). It spawns the zygote, then tries to load the application class. It tries to open the APK resource, can't find it, then crashes the zygote. While it's technically your app that's crashing, none of your app's code was even running yet.
Here's the code in LoadedApk.java,
try {
java.lang.ClassLoader cl = getClassLoader();
if (!mPackageName.equals("android")) {
initializeJavaContextClassLoader();
}
ContextImpl appContext = ContextImpl.createAppContext(mActivityThread, this);
app = mActivityThread.mInstrumentation.newApplication(
cl, appClass, appContext);
appContext.setOuterContext(app);
} catch (Exception e) {
if (!mActivityThread.mInstrumentation.onException(app, e)) {
throw new RuntimeException(
"Unable to instantiate application " + appClass
+ ": " + e.toString(), e);
}
}
Barring some complex locking between app installation and all of the entry points that start components in your app, I think a "fix" here could be to just silently close the process. What else can you do? Someone asked your app to run, but the code isn't there.
Here's the code in LoadedApk.java,
try {
java.lang.ClassLoader cl = getClassLoader();
if (!mPackageName.equals("android")) {
initializeJavaContextClassLoader();
}
ContextImpl appContext = ContextImpl.createAppContext(mActivityThread, this);
app = mActivityThread.mInstrumentation.newApplication(
cl, appClass, appContext);
appContext.setOuterContext(app);
} catch (Exception e) {
if (!mActivityThread.mInstrumentation.onException(app, e)) {
throw new RuntimeException(
"Unable to instantiate application " + appClass
+ ": " + e.toString(), e);
}
}
Barring some complex locking between app installation and all of the entry points that start components in your app, I think a "fix" here could be to just silently close the process. What else can you do? Someone asked your app to run, but the code isn't there.
al...@google.com <al...@google.com> #18
We usually have weekly updates -> we expect 0.5.1 to be released next week. On the meantime, please use the workaround in #5. Sorry for the inconvenience.
[Deleted User] <[Deleted User]> #19
My build.gradle file doesn't have "resources.srcDirs" defined at all but I'm still getting this error.
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java']
res.srcDirs = ['src/main/res']
assets.srcDirs = ['src/main/assets']
}
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java']
res.srcDirs = ['src/main/res']
assets.srcDirs = ['src/main/assets']
}
}
al...@google.com <al...@google.com> #20
Daniel, what is the error that you are getting? Can you please share some more details?
BTW, I tried the snippet you provided with Studio (after fix applied) and it worked fine.
BTW, I tried the snippet you provided with Studio (after fix applied) and it worked fine.
[Deleted User] <[Deleted User]> #21
Hovering over sourceSets{main{}} shown above in Android Studio gives me tooltip error 'main' in 'build' cannot be applied to (groovy.lang.Closure<java.util.ArrayList>)'.
Builds are now yielding errors about xml files being invalid but compiling from the cli works perfect. This was all working perfect before 0.5.0
Builds are now yielding errors about xml files being invalid but compiling from the cli works perfect. This was all working perfect before 0.5.0
fa...@gmail.com <fa...@gmail.com> #22
I updated to 0.5.1 and still have the tooltip error.
## Here is my build.gradle file (Android library):
apply plugin: 'android-library'
android {
compileSdkVersion 14
buildToolsVersion "19.0.3"
buildTypes {
/*
Publish all variants (debug and release here) of the library so they are available to other project
http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication
*/
publishNonDefault true
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = [
'src/main/java',
'src/main/deps/email/src',
'src/main/deps/jsr305/src'
]
}
}
}
## Android Studio tooltip displays on the main block
'main' in 'build' cannot be applied to '(groovy.lang.Closure<java.util.ArrayList>)'
This inspection reports assignments with incompatible types
## Here is my build.gradle file (Android library):
apply plugin: 'android-library'
android {
compileSdkVersion 14
buildToolsVersion "19.0.3"
buildTypes {
/*
Publish all variants (debug and release here) of the library so they are available to other project
*/
publishNonDefault true
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = [
'src/main/java',
'src/main/deps/email/src',
'src/main/deps/jsr305/src'
]
}
}
}
## Android Studio tooltip displays on the main block
'main' in 'build' cannot be applied to '(groovy.lang.Closure<java.util.ArrayList>)'
This inspection reports assignments with incompatible types
[Deleted User] <[Deleted User]> #23
I can build successfully on 0.5.1 but I still get the same error tooltip as #22
vs...@google.com <vs...@google.com> #24
The error tooltip can be ignored. See Issue 36949180 for more info.
na...@gmail.com <na...@gmail.com> #25
I have this bug on intellij 13.1.2 and and gradle for android 0.9.0
[Deleted User] <[Deleted User]> #26
I'm having this same issue on Android Studio 0.8.2 on Mac OSX X 10.9.4
la...@gmail.com <la...@gmail.com> #27
Also having this issue Android Studio 0.8.10, Mac OSX 10.9.4
al...@google.com <al...@google.com> #28
Lawrence, can you please attach a project that reproduces this issue? Thank you!
kz...@gmail.com <kz...@gmail.com> #29
Same here, Windows 7, Android Studio 0.8.10, I used Android Studio 'Create New Project' creator and selected 'Phone and Tablet' and 'Wear' with Minimum SDK set to 15.
fr...@gmail.com <fr...@gmail.com> #30
Same here, Archlinix, Android Studio 1.0.0 RC-2
va...@googlemail.com <va...@googlemail.com> #31
Same issue with AS 1.0.1
er...@gmail.com <er...@gmail.com> #32
Same issue Android Studio 1.0.1, Mac OSX 10.10.1
ro...@r11r.ca <ro...@r11r.ca> #33
Same issue in Android Studio 1.0.2 , Mac OS X. Trying to convert an older Android Studio project to Gradle using this configuration http://tools.android.com/tech-docs/new-build-system/migrating-from-intellij-projects
az...@azizi2u.com <az...@azizi2u.com> #34
i fix it by opening another gradle based project. and then open in new window the project that have gradle error "groovy lang closure". Then, the problem suddenly gone.
Description
Java JRE/JDK version: 1.7.0_45 x64
Android Studio version: 0.5.0
I have a project with a custom directory structure:
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
jniLibs.srcDirs = ['libs']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
Everything worked as expected with previous Android Studio version, but with version 0.5.0 I have following issues:
1. main tag in build.gradle is highlighted as warning with message "'main' in 'build' cannot be applied to '(groovy.lang.Closure<java.util.ArrayList>)'"
2. All java files are not recognized as real java files anymore - syntax highlight is broken, code is not validated
The interesting part is that gradle is still able to compile the project without any problems.
Everything works as expected if I remove sourceSets from the build.gradle and change project structure to the default one.