我在我的应用程序中使用了 ActionBarSherlock 和 ViewPagerIndicator 的组合。我有一个包含 ViewPager 的活动,它使用 FragmentStatePagerAdapter 在选项卡之间滚动。其中一个片段包含一个 IcsSpinner。当活动状态恢复并使用 IcsSpinner 滚动到选项卡时,出现以下异常:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.actionbarsherlock.internal.widget.IcsAbsSpinner$SavedState
at android.os.Parcel.readParcelable(Parcel.java:2077)
at android.os.Parcel.readValue(Parcel.java:1965)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2255)
at android.os.Parcel.readSparseArray(Parcel.java:1687)
at android.os.Parcel.readValue(Parcel.java:2022)
at android.os.Parcel.readMapInternal(Parcel.java:2226)
at android.os.Bundle.unparcel(Bundle.java:223)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1240)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.BackStackRecord.run(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(Unknown Source)
at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(Unknown Source)
at android.support.v4.view.ViewPager.populate(Unknown Source)
at android.support.v4.view.ViewPager.completeScroll(Unknown Source)
at android.support.v4.view.ViewPager.computeScroll(Unknown Source)
at android.view.View.getDisplayList(View.java:12638)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1198)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2173)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
at android.view.Choreographer.doFrame(Choreographer.java:532)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
知道可能是什么原因造成的吗?
谢谢大卫