Load local file and get Unknown chromium error: -6

耗尽温柔 提交于 2019-12-08 22:10:23

问题


I was trying to load a local file from the sdcard into a WebView. But since Android 4.1 it isn't working anymore, I always get the message: File not found and in LogCat

Unknown chromium error: -6.

回答1:


I figured out the Problem and I just needed to add one more slash. Example:

We need now:

loadURL("file:///.../file.file");

instead of:

loadURL("file://.../file.file");

Just add one more slash and it works. I hope this is helpful for all with the same issue under Android 4.1.



来源:https://stackoverflow.com/questions/12261322/load-local-file-and-get-unknown-chromium-error-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!