How to upload a mapping file to Firebase Crashlytics?

itzhar picture itzhar · Nov 14, 2017 · Viewed 16k times · Source

In the old Crash reporting - there is easy way to upload. i didn't find it in the Crashlytics section

Answer

itzhar picture itzhar · Nov 14, 2017

UPDATE: Firebase update their docs: see here

There is no need anymore to manually upload mapping file.

1 - To preserve the info Crashlytics needs for readable crash reports, add the following lines to your config file:

-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception

2 - To let Crashlytics automatically upload the ProGuard or DexGuard mapping file, remove this line from the config file (app/proguard-rules.pro):

-printmapping mapping.txt

For faster builds with ProGuard, exclude Crashlytics. Add the following lines to your config file:

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