How to fix Unmarshalling unknown type code XXX at offset YYY in Android?

前端 未结 10 1892
小鲜肉
小鲜肉 2020-12-05 07:04

I\'m having app crash on resume because of Unmarshalling exception. I\'ve checked all the Serializables have constructor with no parameters and even checked all the serializ

相关标签:
10条回答
  • 2020-12-05 07:24

    Just remove all parcelable methods and generate them again with valid sequence

    0 讨论(0)
  • 2020-12-05 07:28

    Just to add: this error can also happen, when using custom views and don't properly save/restore their states via onSaveInstanceState() and onRestoreInstanceState().

    So if this error occurs, also check your custom views.

    0 讨论(0)
  • 2020-12-05 07:29

    In my case it is fixed after upgrading support library to 23.2.1

    0 讨论(0)
  • 2020-12-05 07:37

    It's not Proguard related issue.. But when proguard and minify enable it's issue occurrence is always.

    Problem is in sequence of writing and reading of object...sequence should be same, as it is like reading file.

    You can use android studio plug in for make class as parcelable https://plugins.jetbrains.com/plugin/7332?pr=

    0 讨论(0)
提交回复
热议问题