【发布时间】:2014-10-05 06:49:36
【问题描述】:
我的应用使用WebView 来显示长文本
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView mWebView = new WebView(getApplicationContext());
setContentView(mWebView);
String s = getHtml(); //get a long html from a file
webView.loadDataWithBaseURL("file:///android_asset/", s, "text/html", "UTF-8", null);
}
该应用在旧版本的 Android 上运行良好,
但是在KitKat上运行时,在创建或销毁WebView时logcat中会出现这个错误:
libGLESv2(21582): HWUI Protection: wrong calling from app context F:ES3-glDeleteShader
我已阅读“迁移到 Android 4.4 中的 WebView”,但我无法解决问题。
我该如何解决这个问题?
【问题讨论】:
-
在 4.4.4 上遇到同样的问题。有人知道是什么原因造成的吗?
标签: android webview android-4.4-kitkat hwui