Search code examples
androidcrashlyticscrashlytics-android

Fabric crashlytics reports crashes in obfuscated format


I use crashlytics to send my reports but crashs not de-obfuscated like this:

Fatal Exception: c.a

I readed here and added

-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable

to my proguard-rules file and there is no

-printmapping mapping.txt

in my configuration files. this is my build.gradle buildTypes part:

buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

            
        }
        debug_server {
            minifyEnabled false
            debuggable true

            matchingFallbacks = ['release']
        }
        debug {
            applicationIdSuffix '.debug'
            versionNameSuffix '-DEBUG'
            minifyEnabled false

        }

}

not all of my crashes are like this and I updated crashlytics to 2.9.4 version.

UPDATE:

I just skipped this

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

as I don't need to skip running proguard on Crashlytics.

UPDATE2: v2.9.9 of crashlytics. Not fixed until now. I can't detect the real cause of bugs.


Solution

  • You have to add an extra rule to proguard file to keep all Kotlin exceptions

    -keep public class * extends java.lang.Exception