在target到Android11及以上的时候,默认setAllowFileAccess
从true改成了false
,无法访问到context.getDir()

只需要手动加上
mWebview.getSettings().setAllowFileAccess(true);
即可
在target到Android11及以上的时候,默认setAllowFileAccess
从true改成了false
,无法访问到context.getDir()
mWebview.getSettings().setAllowFileAccess(true);
即可
本文标题:WebView无法访问本地路径CacheDir下的文件
本文链接:https://www.haomeiwen.com/subject/wwebcdtx.html
网友评论