I'm using the Google Analytics v4 API on an Android app that was built with proguard. The resulting crash reports are cryptic. For instance, `NullPointerException (@a:t:-1) {main}'
1) Can I find the exact location of this crash with the information provided without guessing?
2) How can I improve the readability of the crash reports? The documentation shows how to set a custom exception reporter and that makes sense. However, it also states
Never send the exception message (e.getMessage()) to Google Analytics as it may contain personally identifiable information.
So if not the message, what fields of the exception could I use to generate a crash report that lets me find the position of the crash on an app with proguard?
In addition to @aleph_null has said, you should add these two lines into your proguard config file to keep your line number, otherwise you always see -1 in the exception message.
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
A few things:
Feel free to ask more detailed questions and I'll try to help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With