December 21, 2022

Firebase crashlytics Proguard

Below is a topic we frequently receive questions about. We hope you find the response useful as well.

Firebase crashlytics Proguard

User 1 - Dec 2022

Startup error

I don’t want obfuscated output on firebase crashlytics side with proguard, how can I do it? How can I exclude firebase crashlytics?

Guardsquare Team - Dec 2022

Hello @User 1,

Welcome to the PG Community!

You can find instructions for getting de-obfuscated stacktraces with ProGuard/Crashlytics inside the Firebase manual:

https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=android

To quickly summarize, you need to add the following to your proguard config file:

-keepattributes SourceFile,LineNumberTable        # Keep file names and line numbers.
-keep public class * extends java.lang.Exception  # Optional: Keep custom exceptions.

And enable mapping file upload in your buildTypes:

// To enable Crashlytics mapping file upload for specific build types: buildTypes { debug { minifyEnabled true firebaseCrashlytics { mappingFileUploadEnabled true } } }

Please let us know if something is not clear.

Kindest regards,

The Guardsquare Team

 
Tag(s):

Guardsquare

Discover how Guardsquare provides industry-leading protection for mobile apps.

Request Pricing