查看混淆后的日志

APP混淆已经是APP发布时的标配技术了,但是我们又需要回去用户使用APP时的崩溃日志,这个时候,看到的日志确是被混淆了,想a.b.c.c()!是不是要狂了呢?。所以,Google当然会为我们考虑到这种情况。下面对具体的使用进行说明。

代码混淆生成apk之后,项目下面会多出来一个build\outputs\mapping\release文件夹,下面分别解释release文件夹中四个文件的作用。

dump.txt : 描述了apk中所有类 文件中内部的结构体。( Describes the internal structure of all the class files in the .apk file )

mapping.txt : 列出了原始的类、方法和名称与混淆代码间的映射。( Lists the mapping between the original and obfuscated class, method, and field names. )

seeds.txt : 列出了没有混淆的类和方法。( Lists the classes and members that are not obfuscated )

usage.txt : 列出congapk中删除的代码。( Lists the code that was stripped from the .apk ) 

1.cmd进入sdk/tools/proguard/bin目录。

2.将混淆后的日志cache_file_name.txt和上文提到的mapping文件放入此目录中。

3.执行命令:retrace.bat mapping.txt cache_file_name.txt

执行命令前:

Casused by: java.lang.NullPointerException
at com.example.test d.a.c(SourceFile:110)
at com.example.test d.a.c(SourceFile:88)
at com.example.test .activity.CommitFragmentBase.init(SourceFile:1330)

执行命令后:

Casused by: java.lang.NullPointerException
at com.example.test loginActivity.login.setView(SourceFile:110)
at com.example.test dloginActivity.login.setView(SourceFile:88)
at com.example.test .activity.CommitFragmentBase.init(SourceFile:1330)


这样是不是就很清楚了呢?!

原文:http://blog.csdn.net/fwt336/article/details/51896009

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值