android 4.2以后, 因为安全性的考虑 js交互需要添加注解, 因此注解需要保留
# 保留所有注解 -keepattributes *Annotation* -keepattributes *JavascriptInterface*
# 替换成自己的包名 保留对应的交互方法 -keepclassmembers class <package>.MainActivity$JSInterface { public *; }
android 4.2以后, 因为安全性的考虑 js交互需要添加注解, 因此注解需要保留
# 保留所有注解 -keepattributes *Annotation* -keepattributes *JavascriptInterface*
# 替换成自己的包名 保留对应的交互方法 -keepclassmembers class <package>.MainActivity$JSInterface { public *; }