问题
I have recently turned on Proguard minimisation for an Android app which uses Crashylics reporting on the Fabric console. The project is written mainly in Kotlin.
Crash reports are still received. The stack trace no longer lists Kotlin source files as .kt
though, but as .java
eg, MyFragment.java:20
instead of MyFragment.kt:20
From the information in the traces, such as function and variable names, the line numbers in the stack match up to those in the .kt
file
I have Proguard exclusions as listed in the config guide: https://docs.fabric.io/android/crashlytics/dex-and-proguard.html
Is there an extra action for Kotlin?
I'd like to see the correct file type extension in crash reports
回答1:
Fabric/Firebaser here -
We assume a .java extension by default, but we'll be looking to improve this experience for Kotlin in the future.
回答2:
The problem is that for obfuscated classes the Proguard mapping file doesn't provide any indication of what file that class came from. This is an issue the Crashlytics eng team is aware of, and will hopefully be able to find a fix for in the near future.
来源:https://stackoverflow.com/questions/57518909/why-do-kotlin-files-appear-as-java-is-fabric-crashlytics-with-proguard-enabled