我是一名 Android 新手。刚刚在 ubuntu 安装上安装了 android studio 1.1.0 版本。
当尝试编译默认的 helloworld 应用程序时,我在 logcat 上收到以下 opengl 错误:
-03-17 08:03:01.137 1983-1999/com.example.david.helloandroid W/EGL_emulation﹕ eglSurfaceAttrib not implemented -03-17 08:03:01.137 1983-1999/com.example.david.helloandroid W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa68175c0, error=EGL_SUCCESS -03-17 08:03:01.607 1983-1999/com.example.david.helloandroid W/EGL_emulation﹕ eglSurfaceAttrib not implemented -03-17 08:03:01.607 1983-1999/com.example.david.helloandroid W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa68175c0, error=EGL_SUCCESS
模拟器默认为 Nexus 5 API 21 X86 android 5.0
最佳答案
但是应用程序启动正常吗?如果是(因为它是简单的 HelloWorld 应用程序),那么您不必担心,这是模拟器 OpenGL 工作流程错误,并且(像往常一样)不会引起任何问题。 您可以在创建模拟器时选择设置中的“使用主机 GPU”,尝试使用 GPU 进行 OpenGL 渲染以获得更好的性能(并尝试摆脱这些日志)。
您可以使用其他模拟器,例如 Genymotion,但是(根据我的经验)它也有这些日志消息。
如果您更多地查看 Android 模拟器或设备 logcat 日志,您可能会发现许多不同的服务或应用程序记录了一些错误,但它(通常)不会影响用户体验和应用程序工作。
关于android - 默认 Android 应用程序上的 Opengl 错误 - eglSurfaceAttrib 未实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29094207/