actionbarsherlock中的包裹错误

时间:2013-07-04 07:25:40

标签: android-activity actionbarsherlock android-actionbar android-view

我在崩溃日志下面崩溃了...我无法重现它......任何知道为什么会发生这种情况的人?

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qz.XXXX/com.qz.XXXX.XXXXStartActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@410839c0: Unmarshalling unknown type code -38 at offset 1124
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2351)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$600(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1331)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5485)
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:1028)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:795)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@410839c0: Unmarshalling unknown type code -38 at offset 1124
at android.os.Parcel.readValue(Parcel.java:2037)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2260)
at android.os.Parcel.readSparseArray(Parcel.java:1692)
at android.os.Parcel.readValue(Parcel.java:2027)
at android.os.Parcel.readMapInternal(Parcel.java:2231)
at android.os.Bundle.unparcel(Bundle.java:223)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1232)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1728)
at android.app.Activity.onRestoreInstanceState(Activity.java:957)
at com.actionbarsherlock.app.SherlockActivity.onRestoreInstanceState(SherlockActivity.java:127)
at android.app.Activity.performRestoreInstanceState(Activity.java:929)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1162)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329)

1 个答案:

答案 0 :(得分:1)

重现的步骤:

  1. 启用开发者选项“不要保留活动”
  2. 运行应用程序
  3. 开始其他套餐活动
  4. 按回 - >碰撞
  5. 我已经这样解决了:

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        //super.onSaveInstanceState(outState);
    }
    

    如果您不需要保存活动状态,这是一个非常好的解决方案。