主要问题:
1. webview的Js安全问题
2. webview在Android不同版本的代码兼容问题(特别是4.4版本前后)
参考网址:
http://my.oschina.net/liucundong/blog/318233 远程chrome调试功能
http://blog.csdn.net/t12x3456/article/details/13769731/ 常见问题及解决方法
http://blog.csdn.net/agods/article/details/7443832 webview.relaod()一个简单的例子
http://www.cnblogs.com/zgz345/p/3768174.html 使用详解
http://blog.csdn.net/cmdkmd/article/details/42919213 几个错误的解析
http://itindex.net/detail/53169-android-%E5%BC%80%E5%8F%91-webview 一个实例
http://blog.csdn.net/hanhailong726188/article/details/41247809 一些优化的建议
一个开源项目:很多注意事项需要参考
https://github.com/pedant/safe-java-js-webview-bridge
比如混淆的时候:-keepattributes *Annotation*
JDK版本兼容导致的数字签名证书失效的问题
http://forum.unity3d.com/threads/install_parse_failed_no_certificates.100334/
WebView在Android4.4(20)以后版本的兼容问题,在AndroidManifest.xml里面的target建议小于20:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17" />
如有代码混淆需要注意:
1. -keepattributes *Annotation* //Javascript接口注入需要例外
2 -keep public class com.baby.trustdo.ParentChildEden {
*;
}
3 -keep public class com.baby.trustdo.trustdo.TrustdoActivity {
*;
}
4 -keep class com.baby.trustdo.trustdo.TrustdoActivity$ObjectClassHere { //JS的对象类及其父类需要例外
*;
}