No matter if you use Serializable or Parcelizable (latter is preferred), it happened to everyone. And it’s a really easy mistake to make. I’m talking about crashes when you forget to serialize your models.

You can also run into obfuscation problems in shared preferences. A not serialized model may become obfuscated and impossible to retrieve.

There is a second critical case. A few times I used the wrong model with a similar name that was not serialized. I used it for a Retrofit response. It caused crashes, and unfortunately, not on the development environment but only when I sent requests to their endpoints.

It’s easy to prevent these bugs but not on development builds. Ideally, test it using a ‘stage’ build type. If you don’t have a staging environment, consider creating one. By the way, I haven’t found many good articles about build environments to link here. Maybe I will create one. If you know any good ones, link it in comments, please.

Remember that you can always check it again on google play before publishing. What’s important is to test your app on an environment with enabled minification. This way you can catch problems with serialization. For example, models that you forgot to serialize or broken shared preferences.

By the way, you shouldn’t set minifyEnabled to true on the dev environment. Why? Because it won’t allow you to debug your code even if you set debuggable to true. If you want to debug on stage, set minifyEnabled to false temporarily but don’t commit it.

To test app compatibility, using ADB idea, remove app data from your device. Then build the previous version. Do some operations to fill in shared preferences. Then install a new version and test its behavior.