I have a custom error page to show in a Webview, that is stored in the default asset folder C:\Users\User\StudioProjects\Appname\app\src\main\assets\error.html
In the onReceivedError
method of a WebViewClient
I load the page like this view.loadUrl("file:///android_asset/error.html");
It worked fine when I coded and tested it, however the weird thing is, I tested it again, the Webview showed this error
The webpage at file:///android_asset/error.html could not be loaded because: net::ERR_FILE_NOT_FOUND
I tried the solution from https://stackoverflow.com/a/37994555/4722232, it worked for the html, but I have a logo in it and having the same problem and in the log I'm getting
"Not allowed to load local resource: file:///android_asset/logo.png", source: about:blank (0)
Any help would be greatly appreciated