加载本地文件,获取未知铬错误:-6 [英] Load local file and get Unknown chromium error: -6

查看:158
本文介绍了加载本地文件,获取未知铬错误:-6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从SD卡本地文件加载到的WebView。但由于Android 4.1它不工作了,我总是得到消息:文件不是在LogCat中发现

 未知错误铬:-6。


解决方案

我想通了这个问题,我只是需要增加一个斜线。
例如:

我们现在需要:

 使用loadURL(文件:///.../file.file);

而不是:

 使用loadURL(文件://.../file.file);

只需添加一个斜杠和它的作品。我希望这是所有有同样的问题有帮助的Andr​​oid 4.1下。

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.

解决方案

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.

这篇关于加载本地文件,获取未知铬错误:-6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆