eclipse E/libEGL:Nexus 9 + Android 6 上的 validate_display:255 错误 3008 (EGL_BAD_DISPLAY)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37072215/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) on Nexus 9 + Android 6
提问by Anchor
I'm porting an old big application in Cordova 3.4, from Eclipse to Android Studio because this application used a library that now has been updated in Android 6.
我正在将 Cordova 3.4 中的一个旧的大型应用程序从 Eclipse 移植到 Android Studio,因为该应用程序使用了一个现已在 Android 6 中更新的库。
After some issues with build.gradle and settings.gradle, the App builds, runs and I can make the apk. Every thing works fine on devices with Android 5.
在 build.gradle 和 settings.gradle 出现一些问题后,应用程序构建、运行,我可以制作 apk。在装有 Android 5 的设备上一切正常。
With Android 6 on Nexus 9 the app crashes, with a white screen with this error:
在 Nexus 9 上使用 Android 6 时,应用程序崩溃,出现白屏并显示以下错误:
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
On Internet I've found few answers to this problem, I've tried to work on images resolution, but the problem is not solved. The post Error “validate_display:255 error 3008 (EGL_BAD_DISPLAY)” by Tutorialdoes not work for me.
在互联网上我找到了几个解决这个问题的方法,我尝试解决图像分辨率问题,但问题没有解决。教程的帖子错误“validate_display:255 error 3008 (EGL_BAD_DISPLAY)”对我不起作用。
回答by Nino Liang
In layout.xml,maybe u defined a GLSurfaceView or other View to put your image in.
在 layout.xml 中,也许你定义了一个 GLSurfaceView 或其他视图来放置你的图像。
Is it right?
这样对吗?
So if u put the image to your whole screen, the error wouldn`t be occured.
因此,如果您将图像放在整个屏幕上,则不会发生错误。
回答by Nino Liang
I found the answer about this.
我找到了关于这个的答案。
After API 21,you would get GL thread problem which not occured in API 19.
在 API 21 之后,您会遇到 API 19 中没有发生的 GL 线程问题。
Use this code, it will run fine!
使用此代码,它将运行良好!
XXX.queueEvent(new Runnable() {
@Override
public void run() {
//ADD YOUR FUNCTION
}});