Crashlitycs reporting wrong line number after kotlin migration

The thing is R8 is applying extra optimizations to save space using small integer numbers instead of real line numbers.

The problem with de-obfuscation appears when you try to de-obfuscate using the retrace script inside the Android sdk folder at: /sdk/tools/proguard/bin/retrace.sh

The version of the proguard inside the tools folder is 4.7 which is unable to de-obfuscate optimized line number stacktrace.

The solution is to download the latest official proguard version here and use the retrace tool inside the bin folder, then the line numbers will be de-obfuscated correctly even with R8 enabled. You can verify it manually with latest_proguard/bin/retrace.sh mapping.txt stacktrace.txt

Reference: https://issuetracker.google.com/issues/122752644