3

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.

enter image description here

Thank you!

Lior Pozin
  • 393
  • 1
  • 5
  • 14

2 Answers2

4

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

webview.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

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

Android Webview on 4.4 freezes with nativeOnDraw failed; clearing to background color

WebView Rendering Issue in Android KitKat

Community
  • 1
  • 1
Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52
0

https://blog.clevertap.com/androids-webview-is-broken/

Sizes that are implemented with percentages may crash your webview, I'm not really certain why, so if you can change that, your webview might work properly.

It took me half a day to find it, but it worked for me.