自定义的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

 

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-08-03
  • 2021-12-08
  • 2021-08-03
  • 2021-08-28
  • 2021-08-10
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2021-09-02
  • 2021-10-06
  • 2021-08-07
  • 2022-01-10
  • 2021-06-29
相关资源
相似解决方案