I don't why I'm getting an error:-
The webpage at file:///android_asset/file.html could not be loaded because: net::ERR_FILE_NOT_FOUND
WebSettings mysettings = myweb.getSettings();
mysettings.setJavaScriptEnabled(true);
mysettings.setDomStorageEnabled(true);
myweb.loadUrl("file:///android_asset/www/file.html");
myweb.setWebViewClient(new WebViewClient());
Here Is my file
/RandomPasswordGenerator/app/src/main/assets/www/file.html
Ensure that you have not created another folder called android_asset . Since you've not shown your assets directory, let the www folder be inside the assets folder (app > src > main >assets) . The matter is, what you must give as 'android_asset' is actually shown as 'assets' in the directory listing. With this, you can find yourself a solution by rightly targeting your files.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.