原生App中嵌套 H5, H5不能使用緩存問題

原生安卓 App中嵌套 H5, H5不能使用緩存報一下提示:

Cannot read property 'getItem' of null

通過webView 設置開啓緩存

WebSettings settings = newWebView.getSettings();
settings.setDomStorageEnabled(true);//開啓緩存

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章