android中webview在设置可缓存,缓存路径后还是缓存不到数据是怎么回事?
飞在升级中 2016-09-08 10:23:20 webSetting.setAppCacheEnabled(true); //设置webview可缓存
webSetting.setAppCacheMaxSize(1024 * 1024 * 8); // 设置缓冲大小,8M
webSetting.setAllowFileAccess(true); // 设置使用缓存
webSetting.setAppCachePath(Constant.EXTSTORAGEAPPCACHEPATH);// 设置缓存路径
webSetting.setRenderPriority(WebSettings.RenderPriority.HIGH);
webSetting.setDatabaseEnabled(true); // 开启database storage API功能
webSetting.setDomStorageEnabled(true); // 使用localstorage
webSetting.setDefaultTextEncodingName("UTF-8"); // 设置默认编码
webSetting.setDatabasePath(Constant.EXTSTORAGEAPPBASEPATH); // API 19 deprecated
webSetting.setJavaScriptCanOpenWindowsAutomatically(true);
webSetting.setJavaScriptEnabled(true); // 支持js