Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load local file and get Unknown chromium error: -6

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.
like image 781
Informatic0re Avatar asked Sep 04 '12 10:09

Informatic0re


1 Answers

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.

like image 182
Informatic0re Avatar answered Nov 19 '22 11:11

Informatic0re