使用 eclipse 发布时保留混淆文件的 proguard 副本
有时我会得到很难捕获的错误堆栈跟踪,因为当 Proguard 混淆时,它还会合并一些私有方法,然后在进行回溯时,我没有导致错误的确切行。
我的问题是,在使用 Eclipse 导出签名 apk 时,是否有一种方法可以保留打包在classes.dex 中的混淆类文件。 这样,通过混淆的类文件,我将能够对它们进行反混淆,并更好地查看合并了哪些代码,并找出堆栈跟踪的错误在哪里。
Sometimes I get error stacktraces that are difficult to catch because when Proguard obfuscates it also merge some private methods and then while doing a retrace I don't have the exact line that is causing the error.
My question is if there is a way, while doing the exported signed apk with Eclipse, to preserve the obfuscated class files that are packaged in classes.dex.
That way with the obfuscated class files I will be able to deobfuscated them and see better what code is merged and figure where can be the error of the stacktraces.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要为您发布的每个版本保存mapping.txt文件,然后可以使用它通过“retrace”命令对跟踪进行反混淆(或者只是手动查找mapping.txt中的名称,行号不会改变) ):
http://developer.android.com/guide/developing/tools/proguard.html#decoding
You need to save the mapping.txt file for each version you release, and you can then use it to de-obfuscate the traces with the 'retrace' command (or just lookup names in mapping.txt manually, line numbers don't change):
http://developer.android.com/guide/developing/tools/proguard.html#decoding