自定义的webview使用了
webView.getSettings().setJavaScriptEnabled(true);
但是在加载含有JS界面 时依然 还是报了
ERROR/Web Console(26204):Uncaught TypeError: Cannot call method 'getItem' of null at XXXX/build.js:6等错误
后来添加上 webView.getSettings().setDomStorageEnabled(true);就好了。(是否开启Dom存储Api)参考官方文档
http://developer.android.com/reference/android/webkit/WebSettings.html
转自 http://www.cnblogs.com/jason-star/archive/2012/08/17/2644070.html。