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

后端 未结 8 1091
半阙折子戏
半阙折子戏 2020-11-30 03:54

I have an app that uses WebViews. I\'ve changed my targetAPI from 18 to 19 and I\'m currently testing on the new 4.4. For some reason I\'m getting this error: Not allo

8条回答
  •  难免孤独
    2020-11-30 04:32

    "Not allowed to load local resource" is a security origin error. The KitKat WebView has stronger security restrictions and it seems like these are kicking in. FWIW I tried just loading a file:///android_asset URL and it worked fine.

    Did you call any of the file-related WebSettings APIs (like setAllowFileAccess(false)) by any chance? Are you trying to load the resource from an https: URL?

提交回复
热议问题