GL error from OpenGLRenderer: 0x502

后端 未结 1 1640
耶瑟儿~
耶瑟儿~ 2021-02-02 02:35

Our code is performing very simple operations on a Canvas (entirely in UI thread): drawText, translate, save, restore.

Occasionally, we get this (on Nexus 4 running 4.3)

1条回答
  •  北海茫月
    2021-02-02 03:08

    This error does not happen if you turn off hardware acceleration.

    In the custom view's constructor:

    setLayerType(View.LAYER_TYPE_SOFTWARE, null);
    

    Note: I won't accept this answer (yet) because it's more of a workaround than a proper solution. Hoping for something more definitive...

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