Incorrect line number with ACRA

我与影子孤独终老i 提交于 2020-01-03 17:51:46

问题


I user android/proguard/ACRA. Can anyone tell me please why the crash reports I am getting have incorrect line numbers (line number pointing at obviously a wrong statment)?

It is really annoying that I am unable to know the exact line number of the crash so I can't fix my user's reported error Thank you

PS: I am using the mapping file corresponding to version I am releasing


回答1:


With some optimizations (notably class merging and method inlining), ProGuard may be unable to preserve all debug information, because the java class file format doesn't support it. The information may only be an approximation in those cases. These should be exceptions though; if the information is consistently wrong, you're probably using the wrong mapping file.




回答2:


I found the answer for who is interested. You should avoid (preverify, optimize, and shrink). This will display all lines numbers correctly as the code is not played with




回答3:


After hours of research and trying many approaches. I have found the solution.

Change

proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')...

to

proguardFiles getDefaultProguardFile('proguard-android.txt')...



来源:https://stackoverflow.com/questions/10921882/incorrect-line-number-with-acra

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