Android的ProGuard的回行号 [英] Android ProGuard return Line Number

查看:163
本文介绍了Android的ProGuard的回行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让ProGuard的返回那里的崩溃发生了行号? 我可以使用回扫去的方法,但往往对于像 NullPointerException异常有太多的可能性,并在大块$ C $了C它非常难确定的根本原因,你必须检查每一个对象,它的生命周期,以确保没有错误。这将真正帮助,如果ProGuard的可能缩小,这归因于行号给我。

Is there a way to get ProGuard to return a line number where the crash happened? I can use retrace to get to the method, but often for things like NullPointerException there are too many possibilities and in a large piece of code its extremely hard to determine the underlying cause as you have to check every object and it's life cycle to make sure nothing is wrong. It would really help if ProGuard could narrow this down to a line number for me.

推荐答案

将此行添加到您的ProGuard-project.txt文件。

Add this line to your proguard-project.txt file.

// will keep line numbers and file name obfuscation
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

<一个href="http://proguard.sourceforge.net/index.html#manual/usage.html">http://proguard.sourceforge.net/index.html#manual/usage.html

这篇关于Android的ProGuard的回行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆