简体   繁体   中英

android.os.TransactionTooLargeException: data parcel size 565156 bytes

I have viewpager with fragmens, after so many scrolls app getting crashed by saying follwing , even their is no bundle exchange

while monitoring i found this following keys making the crash

 * android:support:fragments = 561.3 KB
    * android:fragments = 0.4 KB
    * com.google.firebase.analytics.screen_service = 0.2 KB
    * android:lastAutofillId = 0.1 KB
    * android:viewHierarchyState = 3.0 KB

these are all defalut, i am not assigning any bundle how can i fix this issue.

This issue can be fixed by clearing saved Bundle data like below

@Override
protected void onSaveInstanceState(Bundle InstanceState) {
             super.onSaveInstanceState(InstanceState);
             InstanceState.clear();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM