Android WebView 得到白页 nativeOnDraw 失败;清除背景颜色 [英] Android WebView got white page nativeOnDraw failed; clearing to background color

查看:39
本文介绍了Android WebView 得到白页 nativeOnDraw 失败;清除背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在某些 android 版本(4.4.4、4.2.2)genymotion 模拟器上打开 webview,在两个版本上,应用程序上都出现白屏,日志猫上显示以下消息:

I am trying to open webview on some android versions (4.4.4, 4.2.2) genymotion emulators, on both versions got white screen on the app and the following message on log cat:

W/AwContents﹕ nativeOnDraw failed; clearing to background color.

谢谢!

推荐答案

尝试如下设置图层类型.我认为这个问题是奇巧问题.

Try to set layer type like below. I think that problem is Kitkat issue.

webview.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

我对此问题进行了研究,您可以查看下面的这些链接.您的问题看起来像是重复的.

I make research about this issue, you can check these links below. Your question looks like a duplicate of them.

​​4.4 上的 Android Webview 冻结与 nativeOnDraw 失败;清除为背景色

Android KitKat 中的 WebView 渲染问题

这篇关于Android WebView 得到白页 nativeOnDraw 失败;清除背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆