2

我是 Android 开发的新手,到目前为止,我的应用程序进展顺利。今天突然间,当我通过 USB 插入 Nexus 4 以调试应用程序时,我收到了数以万计的libEGL标签错误,这些错误占据了日志中的所有空间 - 使我无法看到任何有意义的消息。

这些libEGL错误似乎与我的应用程序无关,因为当我卸载我的应用程序并插入我的 Nexus 4 时,我仍然看到这些错误。它们如下所示:

validate_display:256 error 3001 (EGL_NOT_INITIALIZED)
eglMakeCurrent:688 error3008 (EGL_BAD_DISPLAY)

我不知道这些错误是从哪里产生的。我的 Log.v 和 Log.i 调用根本没有显示在日志中。我想也许有些东西配置错误 - 所以我做了这里的步骤

Logcat 不显示我的日志调用

但这并没有帮助。提前致谢。

--- 编辑 - 我最终重新启动了我的手机并且错误消息停止了。如果有人有想法,我仍然很想知道为什么会这样。

4

2 回答 2

0

I don't really understand what's causing the errors. But I noticed one time a while back that if I enabled the 'Enable OpenGL traces' in my developer options on the phone, then my logs would fill up with those messages. If you just want to ignore those errors (as in they have nothing to do with your code), then I suggest turning that option off. They don't seem to have any effect on what you're running, as far as I can tell.

于 2014-03-09T19:45:41.903 回答
0

Logcat 可以告诉您写入日志消息的进程/线程的 PID(进程 ID)和 TID(线程 ID),您可以使用它们来识别有问题的应用程序。

例如,在 Android Studio logcat 中给我这样的消息:

06-25 14:54:48.129    6276-6342/? E/libEGL﹕ validate_display:256 error 3001 (EGL_NOT_INITIALIZED)
06-25 14:54:48.129    6276-6342/? E/libEGL﹕ validate_display:256 error 3001 (EGL_NOT_INITIALIZED)
06-25 14:54:48.139    6276-6342/? E/libEGL﹕ eglMakeCurrent:688 error 3008 (EGL_BAD_DISPLAY)

此日志跟踪中的数字6276-6342分别是 PID 和 TID。您可以使用例如adb shell "pid | grep 6276"(从您的日志中替换正确的进程ID)来识别进程。

如果您在 logcat 输出中没有看到 PID,请参阅logcatlogcat 输出格式的文档

于 2014-06-25T14:06:19.443 回答