Reputation:
Look at these crash reports for my android app. Most of them either give me something useless like it crashed at line 1 or 3, or it gives no line at all. Is this how Firebase is supposed to work?
Upvotes: 2
Views: 1168
Reputation: 945
If you are using Proguard try this workaround:
There will be a file named proguard-rules.pro in your Gradle Scripts section on Android Studio/ or in app folder of your project in your explorer.
In this file uncomment this line:
-keepattributes SourceFile,LineNumberTable
This will keep your ClassName and line Number OK.
If you want to hide your className uncomment this line too.
-renamesourcefileattribute SourceFile
And also write this line at last
-printmapping mapping.txt
This line will generate a mapping.txt file (which you can find in the app folder) to deobfuscate your stack trace when you publish the app in the playstore.
After doing all this, create a new release build of your app and update your existing build. Your crash report should work fine now.
If your app is available in the play store, with the apk you need to upload the generated mapping.txt file also. (If you are uploading aab file you don't need to upload it)
To upload the mapping file in the new play console follow these steps:
This should work.
Upvotes: 1