Android 代码混淆常见错误
ONE Goal ,ONE Psaaion !
错误一:
- 当混淆后打包出现异常,如图:
- 看控制台报错: 什么鬼,怎么找.根本点不进去.怎么搞?
Proguard returned with error code 1. See console
proguard.ParseException: Expecting type and name instead of just '***' before '(' in line 129 of file 'G:\myapp\bin\proguard.txt',
included from argument number 4
不过我们能看到有个什么 129行.还有一个G:\myapp\bin\proguard.txt.哎呦喂!有文件有行数.我们进去看看吧.
- 找到文件位置:
查看activity_main文件.
将onclick方法中的”“删掉.或者写上对应的方法.
最后重新打包.ok.可以正常打包了 .