After recent update of my application in Google Play, I started receiving lot of crash reports, all of them are from Samsung devices with Android 5. Lower android versions work
Together with one other developer, who was getting the same crash in his application, we discovered that it is triggered by the -z
parameter of zipalign
tool. (Recompress using Zopfli)
The exactly same APK crashes when aligned and recompressed with Zopfli and doesn't crash when aligned without recompressing.
I can only guess that Samsung made some modifications to the Android 5 and introduced some weird bug in the code that reads the APK. Until that is fixed or I have some better explanation, not using the -z
in zipalign
solves the problem.