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: https://code.google.com/p/android/issues/detail?id=78377

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:

java.lang.NoClassDefFoundError: android.support.v7.internal.view.menu.MenuBuilder

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('proguard-rules.pro')

No comments:

Post a Comment

Please make suggestions :)