I recently ran into an issue with my Firebase Crashlytics where the line of code that crashed was false, because the stack trace that led up to that moment was not even linked to that line of code.
I had a suspicion that the error may be caused because of Minifying the release apk. The file the line of code was from was already in the 'proguard-project.txt' as below:
-keepattributes Exceptions,InnerClasses,SourceFile,LineNumberTable,EnclosingMethod,Signature,*Annotation*
-keepclassmembers class com.SomeCompany.SomeClass.** {
public static <fields>;
}
and this is what is going on in build.gradle:
release {
debuggable false
minifyEnabled true
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
proguardFile 'proguard-project.txt'
signingConfig signingConfigs.production
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
manifestPlaceholders = [xxx:"XXX"]
}
I read some Google Documentation about Readable crash reports in Crashlytics Dashboard and they mentioned adding this (below) to your APK environments:
firebaseCrashlytics {
mappingFileUploadEnabled false // Or True
}
So I was wondering, is mappingFileUploadEnabled already set to False by default? Or should I add that in? Would there be a difference if I added that in? (For context, I would like my Firebase crashes to be more readable)