想了解android webview 中localStorage无效的解决办法的相关内容吗,在本文为您仔细讲解android webview localStorage无效的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:android,webview,localStorage,下面大家一起来学习吧。
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.getSettings().setAppCacheMaxSize(1024*1024*8);
String appCachePath = getApplicationContext().getCacheDir().getAbsolutePath();
mWebView.getSettings().setAppCachePath(appCachePath);
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setAppCacheEnabled(true);