TransactionTooLargeException in Nougat

后端 未结 4 1012
故里飘歌
故里飘歌 2021-01-06 00:57

Exception

 05-12 15:42:45.791 11043-11043/ E/UncaughtException: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 631792         


        
4条回答
  •  攒了一身酷
    2021-01-06 01:45

    Read this article http://nemanjakovacevic.net/blog/english/2015/03/24/yet-another-post-on-serializable-vs-parcelable/ should help you.

    My solution:

    1. Save your objects in some storage (SharedPreferences, raw JSON, SQLLite or Realm database etc.)

    2. Put to your bundle only object 'id' (simple type: int long etc.)

    3. Get 'id' from intent and find it in your storage, then retrieve the object.

提交回复
热议问题