问题描述
我需要从proguard.trace文件(如E/AndroidRuntime(10237):)中删除行,以使跟踪工作.基本上,我正在查看日志文件,需要删除此行,否则回溯将不起作用.我是否缺少某些东西,还是需要为每个堆栈跟踪执行此操作?基本上,之前的信息会出现在堆栈跟踪行的开头,例如
I need to remove lines from my proguard.trace file like E/AndroidRuntime(10237): in order for retrace to work. Basically I am looking at log file and need to remove this lines or retrace does not work. Am I missing something or do I need to do this for every stacktrace? Basically its the information before that appears at the beginning of a stacktrace line like
E/AndroidRuntime(10237): at com.test.a.b.c(UnnownSource) :134
这是整个堆栈跟踪:
E/AndroidRuntime(10237): FATAL EXCEPTION: main
E/AndroidRuntime(10237): java.lang.ArithmeticException: divide by zero
E/AndroidRuntime(10237): at ub.a(SourceFile:180)
E/AndroidRuntime(10237): at wp.getView(SourceFile:290)
E/AndroidRuntime(10237): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(10237): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(10237): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(10237): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime(10237): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime(10237): at dalvik.system.NativeStart.main(Native Method)
etc
E/ ( 2623): Dumpstate > /data/log/dumpstate_app_error
因此,我正在运行./retrace.sh mapping.txt proguard.retrace,其内容已在上方.除非删除E/AndroidRuntime(10237),否则它不会回溯:我是否缺少一些回溯选项.如何为此准备跟踪文件?我不认为它是映射文件,因为在删除该行的第一部分后它就可以工作.
So I am running ./retrace.sh mapping.txt proguard.retrace the contents of which is above. It will not retrace unless I remove E/AndroidRuntime(10237): Am I missing some options to retrace. How do trace files need to be prepared for this to work? I don't think its the mapping file because it works after I remove the first part of the line.
推荐答案
Proguard希望将每个"at"放在单独的行中,并且仅在其前面有空格.如果在at之前看到空白以外的任何内容,则不会对其进行模糊处理.
Proguard wants each "at" on a separate line, and only with white space before it. If it sees anything but white space before the at, it will not unobfuscate it.
这篇关于Proguard Retrace无法使用stacktrace运行时信息,例如E/AndroidRuntime(10237):的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!