Reputation: 579
I have an Android app built with Android Studio using Gradle, and it uses Proguard for obfuscation. After uploading the .aab
file to the Play Store, I noticed that the crashes reported in Firebase Crashlytics are incorrect. Here's an example of a stack trace:
Fatal Exception: java.lang.NullPointerException Attempt to read from field 'boolean d3.z0.D0' on a null object reference com.cbm.qmobile.ui.main.LinechartFragment.isOnViewCreatedCalled (LinechartFragment.java:23) com.cbm.qmobile.ui.main.ChildFragment.setNoDataText (ChildFragment.java:23) com.cbm.qmobile.ui.main.ChildFragment.lambda$onViewCreated$4 (ChildFragment.java:475)
The problem:
Here’s what I’ve done so far to try to resolve the issue:
Added mappingFileUploadEnabled true
to my app-level build.gradle file:
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
firebaseCrashlytics {
mappingFileUploadEnabled true
}
}
}
This didn’t make any difference.
Manually uploaded the mapping.txt
file to the Play Console at:
C:\Users\Makram\AndroidStudioProjects\QMobile\app\build\outputs\mapping\release\mapping.txt
After doing this, it seems that the "Crashes and ANRs" section in the Play Console is now empty, which is puzzling.
Also I do know that I can simply add the follwing lines to the proguard-rules.pro file:
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
However, I want to avoid this because:
Upvotes: 0
Views: 34