js互交代码不混淆,
在proguard-project文件中有这么一句:
<span style="font-family:KaiTi_GB2312;fontsize:14px;">
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}</span>
-keepattributes *Annotation*
-keepattributes *JavascriptInterface*
所以当使用了webview和js交互时,混淆文件中应该添上这些配置:
-keepclassmembers class cn.xx.xx.Activity$AppAndroid {
public *;
}
-keepattributes *Annotation*
-keepattributes *JavascriptInterface*
以上来自:http://blog.csdn.net/minenamewj/article/details/40112335
下面是朋友给的,在此谢谢他了。
第三方jar包不混淆:
自己写的类代码不混淆: