0

首先,我想指定一件事:

webView.loadUrl("http://mydomain.com/file.html"); // working

但如果它是这样的本地文件,则不是:

webView.loadUrl("file:///android_asset/file.html"); // won't working

html文件:

swfobject.embedSWF("file.swf", "flashcontent", "100%", "100%", "9.0.124", "expressInstall.swf", flashvars, params, attributes);

webView .java 文件:

webView = (WebView) findViewById(R.id.webView1);
webView.setWebChromeClient(new WebChromeClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setPluginState(PluginState.ON);


webView.loadUrl("file:///android_asset/file.html");

我的清单:

<uses-sdk android:minSdkVersion="11" />
    ...
    <application
    android:hardwareAccelerated="true"...

我的资产文件夹:

file .html
file .xml
file .swf
file .f4v

我的 file.swf 调用 f4v 电影,但只显示黑屏。

如果能帮到我,万分感谢!!!

编辑:我的 logcat 日食

09-10 10:07:29.420: E/webview(11210): registerForStylusPenEvent onAttachedToWindow
09-10 10:07:29.420: E/webview(11210): registerForStylusPenEvent START
09-10 10:07:29.425: E/webview(11210): registerForStylusPenEvent END
09-10 10:07:29.605: E/SpannableStringBuilder(11210): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
09-10 10:07:29.605: E/SpannableStringBuilder(11210): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
4

0 回答 0