This is becoming extremely frustrating at this point.. everything appears to be correct but I get "Webpage not available" in the webview area. The webpage at file:///android_assets/test.html might be temporarily down or ..... When I coded a quick html page with a string in the same area.. it worked??
my code:
import android.os.Bundle;
import android.webkit.WebView;
import android.app.Activity;
public class ProtoActivity extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView webView;
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("file:///android_assets/test.html");
}
}
Maybe
webView.loadUrl("file:///android_asset/test.html");
(not android_assetS)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With