I am having difficulty in loading a html file from my project assets folder into a webview. I have looked at dozens of tutorials and solutions but none seem to work for me.
your usage is right, so if has this problem, you need check the index.html file existed or not carefully, also you can clean the project, and rebuild it.
You can try this code ....
WebView myBrowser;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String myURL = "file:///android_asset/index.html";
myBrowser=(WebView)findViewById(R.id.mybrowser);
/*By default Javascript is turned off,
* it can be enabled by this line.
*/
myBrowser.getSettings().setJavaScriptEnabled(true);
myBrowser.setWebViewClient(new WebViewClient());
myBrowser.loadUrl(myURL);
}