How to upload a mapping file to Firebase Crashlytics?

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.**

If you have followed the indications to enable the automatic upload then build the app and you still see the stack traces obfuscated in Firebase you should check the log files:

On Linux / Windows: /.crashlytics/com.crashlytics.tools/crashlytics.log
On Mac: ~/Library/Caches/com.crashlytics/com.crashlytics.tools/crashlytics.log

Look for the latest entry with: Uploading deobfuscation file

And try to find the result of the operation like: Deobfuscation file(s) uploaded or Crashlytics had a problem uploading the deobs file and you will get some hints about the cause.


Mike from Firebase here. Crashlytics in Firebase does not offer a way to upload mapping files outside of the build flow. I'm personally curious, did you use the manual upload frequently?