BUG: createWindowSurface failed EGL_BAD_ALLOC

后端 未结 2 1239
灰色年华
灰色年华 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
    }
    
    0 讨论(0)
  • 2021-02-05 03:34

    Have you tried disabling hardware acceleration for your app (it's utilizing OpenGL hence the hunch for this fix)?

    Adding

    <application android:hardwareAccelerated="false" ...>
    

    To application tag in the manifest would explicitly turn it off. And perhaps the issue will go away.

    See this question with answers if you want to know: if should use hardware acceleration or not

    0 讨论(0)
提交回复
热议问题