Kitkat kills: Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png

I found that I had this problem on KitKat when I used webview.loadData(). If I instead used webview.loadDataWithBaseURL() (I used “file:///android_asset/” as the baseURL), then the problem went away.

The methods setAllowFileAccess(), setAllowFileAccessFromFileURLs(), and setAllowUniversalAccessFromFileURLs() did not have any affect that I could see.

Leave a Comment