Class not found when unmarshalling: false, e: java.lang.ClassNotFoundException:

04-2317:04:18.863:E/Parcel(18872):Classnotfoundwhenunmarshalling:false,e:java.lang.ClassNotFoundException:false

04-2317:04:18.867:W/dalvikvm(18872):threadid=1:threadexitingwithuncaughtexception(group=0x40a3a1f8)

04-2317:04:18.890:E/AndroidRuntime(18872):FATALEXCEPTION:main

04-2317:04:18.890:E/AndroidRuntime(18872):java.lang.RuntimeException:UnabletostartactivityComponentInfo{com.b6q9.passmanage/com.shai.manage.activity.MainActivity}:android.os.BadParcelableException:ClassNotFoundExceptionwhenunmarshalling:false

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.ActivityThread.performLaunchActivity(ActivityThread.java:2079)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.ActivityThread.access$600(ActivityThread.java:132)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.ActivityThread$H.handleMessage(ActivityThread.java:1157)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Handler.dispatchMessage(Handler.java:99)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Looper.loop(Looper.java:137)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.ActivityThread.main(ActivityThread.java:4575)

04-2317:04:18.890:E/AndroidRuntime(18872):atjava.lang.reflect.Method.invokeNative(NativeMethod)

04-2317:04:18.890:E/AndroidRuntime(18872):atjava.lang.reflect.Method.invoke(Method.java:511)

04-2317:04:18.890:E/AndroidRuntime(18872):atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)

04-2317:04:18.890:E/AndroidRuntime(18872):atcom.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)

04-2317:04:18.890:E/AndroidRuntime(18872):atdalvik.system.NativeStart.main(NativeMethod)

04-2317:04:18.890:E/AndroidRuntime(18872):Causedby:android.os.BadParcelableException:ClassNotFoundExceptionwhenunmarshalling:false

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Parcel.readParcelable(Parcel.java:1966)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.view.AbsSavedState.<init>(AbsSavedState.java:57)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.view.View$BaseSavedState.<init>(View.java:14338)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.view.ext.SatelliteMenu$SavedState.<init>(SatelliteMenu.java:547)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.view.ext.SatelliteMenu$SavedState$1.createFromParcel(SatelliteMenu.java:573)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.view.ext.SatelliteMenu$SavedState$1.createFromParcel(SatelliteMenu.java:1)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Parcel.readParcelable(Parcel.java:1992)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Parcel.readValue(Parcel.java:1854)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Parcel.readSparseArrayInternal(Parcel.java:2123)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Parcel.readSparseArray(Parcel.java:1576)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Parcel.readValue(Parcel.java:1911)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Parcel.readMapInternal(Parcel.java:2094)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Bundle.unparcel(Bundle.java:223)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.os.Bundle.getSparseParcelableArray(Bundle.java:1225)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.FragmentManagerImpl.moveToState(FragmentManager.java:766)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.FragmentManagerImpl.moveToState(FragmentManager.java:1032)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1764)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.Activity.onCreate(Activity.java:864)

04-2317:04:18.890:E/AndroidRuntime(18872):atcom.slidingmenu.lib.app.SlidingActivity.onCreate(SlidingActivity.java:20)

04-2317:04:18.890:E/AndroidRuntime(18872):atcom.shai.manage.activity.MainActivity.onCreate(MainActivity.java:48)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.Activity.performCreate(Activity.java:4465)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)

04-2317:04:18.890:E/AndroidRuntime(18872):atandroid.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)

04-2317:04:18.890:E/AndroidRuntime(18872):...11more

这个错误发生在ANDROIDSDKTool更新到22.6.2时,突然发生的,不知道是不是与这个相关

主要问题是出现在保存VIEW状态时出错自定义VIEW类里实现了Parcelable接口

extendsBaseSavedState

staticclassSavedStateextendsBaseSavedState{

booleanrotated;

privatefloattotalSpacingDegree;

privateintsatelliteDistance;

privateintmeasureDiff;

privateintexpandDuration;

privatebooleancloseItemsOnClick;

SavedState(ParcelablesuperState){

super(superState);

System.out.println("1"+superState);

}

publicSavedState(Parcelin){

super(in);

rotated=Boolean.valueOf(in.readString());

totalSpacingDegree=in.readFloat();

satelliteDistance=in.readInt();

measureDiff=in.readInt();

expandDuration=in.readInt();

closeItemsOnClick=Boolean.valueOf(in.readString());

}

@Override

publicintdescribeContents(){

return0;

}

@Override

publicvoidwriteToParcel(Parcelout,intflags){

super.writeToParcel(out,flags);

out.writeString(Boolean.toString(rotated));

out.writeFloat(totalSpacingDegree);

out.writeInt(satelliteDistance);

out.writeInt(measureDiff);

out.writeInt(expandDuration);

out.writeString(Boolean.toString(closeItemsOnClick));

}

publicstaticfinalParcelable.Creator<SavedState>CREATOR=newParcelable.Creator<SavedState>(){

publicSavedStatecreateFromParcel(Parcelin){

returnnewSavedState(in);

}

publicSavedState[]newArray(intsize){

returnnewSavedState[size];

}

};

}

问题出现在没有加入这行代码super.writeToParcel(out,flags);

相关推荐