我正在尝试将一个简单的swf加载到一个嵌入的WebView中.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView wv = (WebView)findViewById(R.id.web);
WebSettings settings = wv.getSettings();
settings.setPluginState(PluginState.ON);
wv.loadUrl("file:///android_asset/example.swf");
}
Run Code Online (Sandbox Code Playgroud)
main.xml中:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/web"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我在这段代码中没有看到任何错误......但我的网页视图仍显示黑色
通过检查LogChat我发现了这个错误:
11-30 12:46:32.170: E/libEGL(13839): call to OpenGL ES API with no current context (logged once per thread)
Run Code Online (Sandbox Code Playgroud)
那是吗?我该如何解决?
我正在使用这个swf:http://www.tizag.com/pics/example.swf
我正在使用摩托罗拉Xoom - Android 3.1.
有人可以帮忙吗?