当onSaveInstanceState调用

时间:2019-04-12 07:29:22

标签: android-9.0-pie onsaveinstancestate transactiontoolargeexception

似乎在调用onSaveInstanceState时发生了。

Android 8.1和9.0设备都有此问题。

该如何解决?

非常感谢!

13404-10 02:49:44.606 16580 16580 E JavaBinder:!!!绑定交易失败!!! (包裹大小= 527472)

13504-10 02:49:44.606 16580 16580 W ActivityStopInfo:捆绑统计信息:

13604-10 02:49:44.606 16580 16580 W ActivityStopInfo:android:viewHierarchyState [size = 2104]

13704-10 02:49:44.607 16580 16580 W ActivityStopInfo:android:views [size = 2000]

13804-10 02:49:44.620 16580 16580 W ActivityStopInfo:android:support:fragments [size = 524484]

13904-10 02:49:44.620 16580 16580 W ActivityStopInfo:PersistableBundle统计信息:

14004-10 02:49:44.620 16580 16580 W ActivityStopInfo:[null]

14104-10 02:49:44.620 16580 16580 D AndroidRuntime:关闭VM 142 ---------崩溃开始

14304-10 02:49:44.621 16580 16580 E AndroidRuntime:致命异常:main

14404-10 02:49:44.621 16580 16580 E AndroidRuntime:进程:com.cwj.hsing,PID:16580

14504-10 02:49:44.621 16580 16580 E AndroidRuntime:java.lang.RuntimeException: android.os.TransactionTooLargeException:数据包大小527472字节

14604-10 02:49:44.621 16580 16580 E AndroidRuntime:在android.app.servertransaction.PendingTransactionActions $ StopInfo.run(PendingTransactionActions.java:160)

14704-10 02:49:44.621 16580 16580 E AndroidRuntime:位于android.os.Handler.handleCallback(Handler.java:873)

14804-10 02:49:44.621 16580 16580 E AndroidRuntime:在android.os.Handler.dispatchMessage(Handler.java:99)

14904-10 02:49:44.621 16580 16580 E AndroidRuntime:位于android.os.Looper.loop(Looper.java:280)

15004-10 02:49:44.621 16580 16580 E AndroidRuntime:位于android.app.ActivityThread.main(ActivityThread.java:6706)

15104-10 02:49:44.621 16580 16580 E AndroidRuntime:在java.lang.reflect.Method.invoke(本机方法)

15204-10 02:49:44.621 16580 16580 E AndroidRuntime:在com.android.internal.os.RuntimeInit $ MethodAndArgsCaller.run(RuntimeInit.java:493)

15304-10 02:49:44.621 16580 16580 E AndroidRuntime:在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

15404-10 02:49:44.621 16580 16580 E AndroidRuntime:由以下原因引起:android.os.TransactionTooLargeException:数据包大小为527472字节

15504-10 02:49:44.621 16580 16580 E AndroidRuntime:位于android.os.BinderProxy.transactNative(本机方法)

15604-10 02:49:44.621 16580 16580 E AndroidRuntime:在android.os.BinderProxy.transact(Binder.java:1127)

15704-10 02:49:44.621 16580 16580 E AndroidRuntime:在android.app.IActivityManager $ Stub $ Proxy.activityStopped(IActivityManager.java:4011)

15804-10 02:49:44.621 16580 16580 E AndroidRuntime:在android.app.servertransaction.PendingTransactionActions $ StopInfo.run(PendingTransactionActions.java:144)

15904-10 02:49:44.621 16580 16580 E AndroidRuntime:...还有7个

1 个答案:

答案 0 :(得分:0)

捆绑交易为null即可!如果您不需要保存bundleData,可以这样做!

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