我正在尝试从 assets 文件夹将 .swf 文件打开到 web 视图中。但是 .swf 文件没有打开。它只是显示黑屏而不是我想要的视频。到目前为止我尝试过的代码如下:
mSWFPlayer = (WebView) findViewById(R.id.webView_swfPlayer);
mSWFPlayer.getSettings().setPluginState(PluginState.ON);
mSWFPlayer.getSettings().setPluginsEnabled(true);
mSWFPlayer.loadUrl("file:///android_asset/lovebirds.swf");
Manifest 文件中还有一个 Internet Permission 和 android:hardwareAccelerated="true"。而且我还从这个站点安装了 adobe flash ......这个 我的 logcat 显示如下消息:
5-09 13:33:30.187: W/webcore(20054): java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.
05-09 13:33:30.187: W/webcore(20054): at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1683)
05-09 13:33:30.187: W/webcore(20054): at android.webkit.WebViewCore$EventHub.access$7900(WebViewCore.java:926)
05-09 13:33:30.187: W/webcore(20054): at android.webkit.WebViewCore.removeMessages(WebViewCore.java:1795)
05-09 13:33:30.187: W/webcore(20054): at android.webkit.WebView.sendOurVisibleRect(WebView.java:2917)
05-09 13:33:30.187: W/webcore(20054): at android.webkit.ZoomManager.setZoomScale(ZoomManager.java:593)
05-09 13:33:30.187: W/webcore(20054): at android.webkit.ZoomManager.access$1700(ZoomManager.java:49)
05-09 13:33:30.187: W/webcore(20054): at android.webkit.ZoomManager$PostScale.run(ZoomManager.java:984)
05-09 13:33:30.187: W/webcore(20054): at android.os.Handler.handleCallback(Handler.java:605)
05-09 13:33:30.187: W/webcore(20054): at android.os.Handler.dispatchMessage(Handler.java:92)
05-09 13:33:30.187: W/webcore(20054): at android.os.Looper.loop(Looper.java:137)
05-09 13:33:30.187: W/webcore(20054): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-09 13:33:30.187: W/webcore(20054): at java.lang.reflect.Method.invokeNative(Native Method)
05-09 13:33:30.187: W/webcore(20054): at java.lang.reflect.Method.invoke(Method.java:511)
05-09 13:33:30.187: W/webcore(20054): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-09 13:33:30.187: W/webcore(20054): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-09 13:33:30.187: W/webcore(20054): at dalvik.system.NativeStart.main(Native Method)
如果您有任何想法,请帮助我。我几乎访问了所有与此问题相关的网站,但我没有得到任何解决方案。在此先感谢...