F
F
Fenixsar2016-04-24 19:13:26
Android
Fenixsar, 2016-04-24 19:13:26

Why "Not allowed to load local resource: file:///android_asset/..."?

An interesting situation.

<uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

xWalkWebView.load("file:///android_asset/index.html", null); // Все работает

But if we access any server that has the same file.
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <base href="/">
</head>

<body>
    <img src="file:///android_asset/img/logo.png">
    <img src="file:///android_asset/img/preloaderWhite.gif">

</body>

</html>

xWalkWebView.load("http://192.168.0.102/", null); //

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question