我正在尝试显示/storage/sdcard0/... 中的 html 文件
WebView engine = (WebView) (findViewById(R.id.webView1));
engine.setWebViewClient(new WebViewClient());
engine.loadUrl(Environment.getExternalStorageDirectory().getPath() + "testing.html");
但是网页无法显示....有人可以帮忙吗?谢谢!
最佳答案
已解决!!! 应该在前面加上"file:///"=]=]
engine.loadUrl("file:///" +
Environment.getExternalStorageDirectory().getPath() +
"testing.html");
关于Android从外部存储读取html文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15652524/