Fabric Crashlytics reports display some letters instead of classes names of my Android App
Asked Answered
S

2

9

In Fabric Crashlytics reports I see some letters instead of classes names. for example when I see "MainActivity" I understand that a crash occured in MainActivity.java, but now I see letter "a" , "e" or "w" instead of class name and I can't understand in which class that crash occured!

picture of my crashlytics reports

How can I solve this problem?

Shylashylock answered 22/11, 2017 at 9:24 Comment(2)
In your gradle file do you use proguard obfuscation ??Hoopla
@Fakher: Yes, I do. I'm checking out MadScientist's Answer. I think I got it.Shylashylock
R
6

Possibly you're using proguard or dexguard to obfuscate your code, hence when crashlytics reports it, it reports it with symbols instead of actual method and class names.

  1. if you wish to use proguard with crashlytics, follow this doc here to add the necessary proguard rules or simple exclude proguard on crashlytics by adding the following to your proguard-rules file:

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

would recommend adding all the rules mentioned there for better stability.

  1. if you do not know what proguard is or wish not to use it, go to your build.gradle file for app and change the line to:

    minifyEnabled false
    

Happy coding!

Resplendent answered 22/11, 2017 at 9:32 Comment(5)
Yes I'm using proguard to obfuscate my code. Your first soloution solved my problem.Shylashylock
Have you followed this link ? It has some more useful infoWhoever
@RenatoAlmeida: Mr. MadScientist's Answer contains this link, too. It was useful.Shylashylock
minifyEnabled false perfect you just digged a whole and buried decades worth effort of making an app secureOtero
Anyone looking for firebase docs, it is here (not the fabric docs, which are now deprecated)Grous
H
-1

You must upload your mapping file for your obfuscatated code. In that way the stack trace will be de obfiscated. This is the official documentation

Hoopla answered 22/11, 2017 at 9:39 Comment(2)
Crashlytics automatically does that, you can see it in this linkWhoever
@Hoopla you're linking to the documentation of Google Play. The question is about Fabric's Crashlytics.Disciplinant

© 2022 - 2024 — McMap. All rights reserved.