com.android.support:appcompat-v7 and design version 23.2.0 crash parcel error

不问归期 提交于 2019-12-30 07:13:07

问题


I'm using in my app several libraries from android support and i update them when they are available.

During the test of the version 23.2.0, i've got a crash when i change the app permissions on android 6. As you know, when the user disable a permission, the app is recreated (same way as when the device rotate) and your parcelable objects are saved and restored from a bundle.

With the version 23.2.0, when the app is recreated, i've got a parcel error. I think that this error is not from my code but from the android code. I don't have this error when i use the libraries version 23.1.1 or lower.

Here is a dump :

E/AndroidRuntime: FATAL EXCEPTION: main Process: org.team.acs.scubalog, PID: 15378 java.lang.RuntimeException: Unable to start activity ComponentInfo{org.team.acs.scubalog/org.team.acs.scubalog.MainActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@3a99bef: Unmarshalling unknown type code 3801188 at offset 2452 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@3a99bef: Unmarshalling unknown type code 3801188 at offset 2452 at android.os.Parcel.readValue(Parcel.java:2340) at android.os.Parcel.readArrayMapInternal(Parcel.java:2614) at android.os.BaseBundle.unparcel(BaseBundle.java:221) at android.os.Bundle.getSparseParcelableArray(Bundle.java:856) at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2033) at android.app.Activity.onRestoreInstanceState(Activity.java:1008) at android.app.Activity.performRestoreInstanceState(Activity.java:963) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1163) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5417)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

After investigation, the libraries which produce this error are

com.android.support:appcompat-v7:23.2.0 AND com.android.support:design:23.2.0

If i use the version 23.1.1 => no crash.

Any idea about this crash ?


回答1:


Bug is fixed on support library 23.2.1

Ref: App with SearchView crashing on restore



来源:https://stackoverflow.com/questions/35647598/com-android-supportappcompat-v7-and-design-version-23-2-0-crash-parcel-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!