BUG: createWindowSurface failed EGL_BAD_ALLOC

后端 未结 2 1265
灰色年华
灰色年华 2021-02-05 03:13

I have an application on Google Play for counting down numbers and letters. In this application I have the following activities:

  • google sigin
  • archivements
2条回答
  •  甜味超标
    2021-02-05 03:22

    I had the same issue and found that the problem is related to WebView(s) and hardware acceleration on some devices.

    Instead of turning off completely hardware acceleration, I disabled it for all my WebView(s) including the AdMob view!

    Here how to do it:

    adView = new AdView(this); //or get it with findViewById()
    if (Build.VERSION.SDK_INT >= 11) {
       adView.setLayerType(AdView.LAYER_TYPE_SOFTWARE, null); //instead of LAYER_TYPE_HARDWARE
    }
    

提交回复
热议问题