【问题标题】:Android Studio - Emulator - eglSurfaceAttrib not implementedAndroid Studio - 模拟器 - eglSurfaceAttrib 未实现
【发布时间】:2015-05-12 01:18:57
【问题描述】:

我用 android studio 创建了一个应用程序,从不更改任何文件中的一个单词。

尝试在模拟器上运行时出现以下错误:

W/EGL_emulation﹕ eglSurfaceAttrib not implemented
W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa6c1ace0,error=EGL_SUCCESS
I/Choreographer﹕ Skipped 45 frames!  The application may be doing too much work on its main thread.
W/EGL_emulation﹕ eglSurfaceAttrib not implemented
W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa6c1ace0, error=EGL_SUCCESS

当我在真实设备上运行它时,我没有遇到同样的问题:

W/IInputConnectionWrapper﹕ getExtractedText on inactive InputConnection
W/IInputConnectionWrapper﹕ getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper﹕ getSelectedText on inactive InputConnection
W/IInputConnectionWrapper﹕ getTextAfterCursor on inactive InputConnection
W/art﹕ Before Android 4.1, method int android.support.v7.internal.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView

【问题讨论】:

  • 取消使用主机 GPU 时,可以写入文件吗?

标签: android android-studio android-emulator


【解决方案1】:

我也发现了同样的情况,但仅限于勾选了 Use Host GPU 设置的模拟器。尝试将其关闭,您将不再看到这些警告(并且模拟器将运行得非常非常慢......)

根据我的经验,这些警告是无害的。请注意,“错误”是 EGL_SUCCESS,这似乎表明根本没有错误!

【讨论】:

  • 它在:工具 > Android > AVD 管理器 > 编辑虚拟设备并在那里找到使用主机 GPU 设置。
  • 在使用 x86 CPU/ABI 时需要 API > 15(JellyBean 或更好)。因此,对于 IceCreamSandwich 及以下版本,在模拟 mips CPU/ABI 时,性能变得可以接受。 (手臂似乎也太慢了。)
  • 是的,但是有什么方法可以解决这个问题吗?硬件加速/ Looper ?请。
  • 用我的物理设备尝试过并且工作正常,但它在我的模拟器上给出了错误。
  • @LamonteCristo 可以帮助我找出这个选项我正在使用 Nexus 5 API 22 x86 请找到这张图片s14.postimg.org/62vlvbicx/scmain.png
【解决方案2】:

修复:在运行之前解锁您的设备。

大家好:我想我可以解决这个问题:

听起来很荒谬,但请尝试解锁您的虚拟设备;即使用鼠标滑动并打开。然后你的应用程序应该可以工作了!!

【讨论】:

  • 为什么反对票比赞成票多?如果你像我一样来到这里,将警告误解为错误,并得出结论认为事情不正常——这实际上是你需要做的,如果你能忍受警告的话。
  • 我的虚拟设备已解锁,但我仍然收到此警告。
  • 这是我的模拟器没有像我预期的那样自动显示应用程序的分辨率。我必须手动“向上滑动”才能“解锁”设备。
  • 在其他 SO 线程中也报告了通过首先通过“滑动”解锁设备来修复条件。因此,请不要仅仅因为它不适用于您的情况或“听起来不正确”而拒绝该建议。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-08-01
  • 1970-01-01
  • 2016-11-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多