1

我在下面的崩溃日志中崩溃了……我无法重现它……任何知道为什么会发生的人?

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)
4

1 回答 1

1

重现步骤:

  1. 启用开发者选项“不保留活动”
  2. 运行应用程序
  3. 开始其他包裹活动
  4. 按回 -> 崩溃

我已经这样解决了:

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

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

于 2013-09-29T17:41:42.133 回答