Crashlytics ProGuard rules

Crashlytics - most powerful, yet lightest weight crash reporting solution

Spend less time finding and more time fixing crashes. Named the #1 performance SDK on both iOS and Android, Crashlytics provides deep and actionable insights, even the exact line of code your app crashed on.

ProGuard rules for Crashlytics

Unused classes, methods will be removed by ProGuard's optimization phase. ProGuard writes out class files named 'a.class', 'b.class', etc. in the obfuscation step. Specify the next ProGuard-style specification for your configuration file.

-keepattributes *Annotation*
# in order to provide the most meaningful crash reports, add the following line:
-keepattributes SourceFile,LineNumberTable
# If you are using custom exceptions, add this line so that custom exception types are skipped during obfuscation:
-keep public class * extends java.lang.Exception

For Fabric to properly de-obfuscate your crash reports, you need to remove this line from your configuration file to automatically upload your mapping file.

-printmapping mapping.txt

Exclude Crashlytics with ProGuard

To skip running ProGuard on Crashlytics, just add the following to your ProGuard config file.

-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**

For more information about Crashlytics please see the website.

Related ProGuard rules

Static Gson ProGuard rules

Popular ProGuard rules