androidfirebaseproguardcrashlyticscrashlytics-android

File names are coming as obfuscated names in the Crashlytics logs


I have added the below lines, still the crashlytics logs are coming as obfuscated names. Unable to see the file names, it comes like "Unable to instantiate fragment h.d.p.q.s.b: could not find Fragment constructor". Any help would be useful to me.

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

firebaseCrashlytics {
   mappingFileUploadEnabled true
}

Solution

  • This is due to proguard. You have two options:

    1)Turn off proguard in your build. This will make your app slightly easier to reverse engineer, but in reality if anyone wanted to do it they could anyway.

    2)Proguard also builds a reverse obfuscation mapping. Upload this to crashlytics, and it can remap the names in the log files.