Sunday, October 11, 2015

Avoiding AppCompat Proguard Crashes on Samsung Devices

appcompat-v7 v21.0.0 causing crash on Samsung devices with Android v4.2.2

Original Issue:

Google already provides Proguard rules for some of their libraries through AARs. One major issue that affects Samsung Jellybean devices(Android 4.2), is App Compat's Toolbar.

For those that have devices from Samsung running the same Android OS version or are tracking crash reports, you will most likely see the following error:


Here is the Proguard rules to resolve this issue for (AppCompat-v7, v21,22,23.0.1):

Apply it to your own build.gradle:
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), rootProject.file('')