gpt4 book ai didi

java - Android 在恢复时崩溃。如何解释这个异常?

转载 作者:塔克拉玛干 更新时间:2023-11-02 18:53:28 27 4
gpt4 key购买 nike

我收到了几份这样的崩溃报告,但我不确定这是什么意思。只是为了说清楚 - 这是我无法复制的东西。这是 ACRA 报告的

'在偏移量 1232 处解码未知类型代码 2131296357'

下面是完整的错误堆栈跟踪:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.idatt/com.idatt.activities.NewMailActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@40651010: Unmarshalling unknown type code 2131296357 at offset 1232
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@40651010: Unmarshalling unknown type code 2131296357 at offset 1232
at android.os.Parcel.readValue(Parcel.java:1913)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1682)
at android.app.Activity.onRestoreInstanceState(Activity.java:844)
at android.app.Activity.performRestoreInstanceState(Activity.java:816)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1629)
... 11 more
java.lang.RuntimeException: Parcel android.os.Parcel@40651010: Unmarshalling unknown type code 2131296357 at offset 1232
at android.os.Parcel.readValue(Parcel.java:1913)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1682)
at android.app.Activity.onRestoreInstanceState(Activity.java:844)
at android.app.Activity.performRestoreInstanceState(Activity.java:816)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1629)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)

最佳答案

在模拟器上,应该有一个 Dev Tools 应用程序。打开该应用程序,从列表中选择“开发设置”,然后选中“立即销毁 Activity ”旁边的框。现在,当您运行您的应用程序时,当您按下主页按钮时,前台 Activity 将被销毁。然后,您可以通过长按或从“应用程序”屏幕重新启动您的应用程序以重现错误。

关于java - Android 在恢复时崩溃。如何解释这个异常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10983662/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com