Problems cargando activos html en webview
Tengo dificultades para cargar un archivo html de la carpeta de activos de mi proyecto en una vista web. He visto docenas de tutoriales y soluciones, pero ninguna parece funcionar para mí.
En la carpeta de activos de mi proyecto tengo dos archivos html simples. index.html y faq.html (El plan es utilizar esta estructura para mi documentación de ayuda)
Mi código
WebView wv = (WebView)findViewById(R.id.webview1);
wv.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return true;
}
});
wv.loadUrl("file:///android_asset/index.html");
La vista web muestra lo siguiente:
Web Page Not Available
The Web Page at file:///android_asset/index.html could not be loaded as:
The requested file was not found. index.html
De todo lo que he leído, lo que tengo aquí debería funcionar, pero no funciona.