Kitkat kills: Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png
"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?
Not allowed to load local resource:file:///android_asset phonegap
You need to use InAppBroswer plugin for that.
cordova plugin add cordova-plugin-inappbrowser
Plugin found here
Xamarin Android Webview: Not allowed to load local resource file:///android_asset/*.css source: (1)?
This issue should implementing the WebViewClient with a shouldInterceptRequest
override like this thread.
Kitkat kills: Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png
Facebook token auth fails on Android but not browsers
Ok, I solved it. It was due to omniauthWindowType: window.cordova == undefined ? 'sameWindow' : 'inAppBrowser'
that always used sameWindow
.
Android - How to load external javascript files within at runtime generated HTML data?
It seems the Javascript same origin policy is the root of the problem. The WebView will only load javascript files which are from the same origin as the html. Since no origin for the html was given, the data scheme is used as default. If, however, the data is loaded with the same base url as the javascript files, no problem arises.
Load the html data (with file:///android_asset/javascript/
being the directory of the javascript files):
webview.loadDataWithBaseURL("file:///android_asset/javascript/", page, "text/html", "UTF-8", null);
Then reference the javascript files like this inside the html:
<script src='jquery-1.8.2.js' type='text/javascript'></script>
<script src='src_javascript.js' type='text/javascript'></script>
Related Topics
Debugging Android Ndk Native Apps
Android Button Background Color
Android Custom Layout - Ondraw() Never Gets Called
Changing the Screen Brightness System Setting Android
Cannot Deserialize Instance of Object Out of Start_Array Token in Spring Webservice
How to Rotate Textview 90 Degrees and Display
Webview Rendering Issue in Android Kitkat
How to Use "Goasync" for Broadcastreceiver
How to Dynamically Change an App Icon Like Calendar App Does
How to Make Layouts for Several Android Screen Sizes
How to Display Images from a Specific Folder on Android Gallery
Filling a Circle Gradually from Bottom to Top Android
How to Retrieve HTML Content from Webview (As a String)
Genymotion Error After Windows 10 Upgrade
How to Get the Battery Level After Connect to the Ble Device