Google Play Console: incorrect line numbers in pre-launch crash report using mapping.txt / proguard-rules.pro

可紊 提交于 2020-12-15 05:30:54

问题


My Android release build uses the following proguard-rules.pro

-keepattributes Signature
-keepattributes *Annotation*
-keepattributes EnclosingMethod
-keepattributes InnerClasses
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

-keepnames class com.mypackage.** { *; }
-keepclassmembers class com.mypackage.** { *; }

...

I'm uploading mapping.txt along with the build when performing the Google Play console pre-launch testing. Any crashes during testing have the correct function / class information for my package, but the line numbers are completely incorrect:

Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
    at java.util.ArrayList.get(ArrayList.java:437)
    at com.mypackage.MyClass1.getHistory(MyClass1.java:1)   <-- this is incorrect
    at com.mypackage.MyClass2.onCreate(MyClass2.java:9)  <-- this is incorrect
    at androidx.fragment.app.Fragment.performCreate(Fragment.java:6)
    at b.m.b.g0.d(FragmentStateManager.java:5)
    at b.m.b.g0.j(FragmentStateManager.java:33)
    ...

Any help much appreciated.

*** Update ***

I've tried running with the stand-alone R8 tool as per suggestion by @sgjesse in this and the deobfuscated line numbers are correct, so I'm assuming it's a funny with Google Play Console.

来源:https://stackoverflow.com/questions/64892774/google-play-console-incorrect-line-numbers-in-pre-launch-crash-report-using-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!