youngkaaa / YViewPagerDemo

[停止维护]YViewPager,support horizontal and vertical,based on support.v4.view.ViewPager
Apache License 2.0
360 stars 67 forks source link

Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v4.view.ViewPager$SavedState #3

Closed zxyaust closed 7 years ago

zxyaust commented 7 years ago

this is the error information. Every time if the state need to save and restore the error come.I don't know how to solve it. Thank you! java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yilagu.cqy/com.yilagu.cqy.activity.homeActivity.MainActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v4.view.ViewPager$SavedState at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2454) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2514) at android.app.ActivityThread.access$900(ActivityThread.java:161) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5518) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635) Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v4.view.ViewPager$SavedState at android.os.Parcel.readParcelableCreator(Parcel.java:2432) at android.os.Parcel.readParcelable(Parcel.java:2358) at android.view.AbsSavedState.(AbsSavedState.java:57) at android.view.View$BaseSavedState.(View.java:21553) at com.yilagu.cqy.view.DirectionalViewPager$SavedState.(DirectionalViewPager.java:0) at com.yilagu.cqy.view.DirectionalViewPager$SavedState$1.createFromParcel(DirectionalViewPager.java:459) at com.yilagu.cqy.view.DirectionalViewPager$SavedState$1.createFromParcel(DirectionalViewPager.java:455) at android.support.v4.os.ParcelableCompatCreatorHoneycombMR2.createFromParcel(ParcelableCompatHoneycombMR2.java:46) at android.os.Parcel.readParcelable(Parcel.java:2365) at android.os.Parcel.readValue(Parcel.java:2264) at android.os.Parcel.readSparseArrayInternal(Parcel.java:2675) at android.os.Parcel.readSparseArray(Parcel.java:1967) at android.os.Parcel.readValue(Parcel.java:2321) 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:2032) at android.app.Activity.onRestoreInstanceState(Activity.java:1015) at android.app.Activity.performRestoreInstanceState(Activity.java:970) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1164) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2427) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2514)  at android.app.ActivityThread.access$900(ActivityThread.java:161)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5518)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635) 

zxyaust commented 7 years ago

sorry I made a mistake,this error is not for this view

raviyadav5951 commented 5 years ago

sorry I made a mistake,this error is not for this view

@zxyaust I faced similar issue in DirectionalViewPager on rotating the device many times. Any solution for this.