Android Studio -模拟器- eglSurfaceAttrib未实现

时间:2021-08-28 23:43:40

I have created an application with android studio, never change a single word in any file.

我已经在android studio中创建了一个应用程序,在任何文件中都不会改变一个单词。

when trying to run it on the emulator I got the following error:

在模拟器上运行时,我得到了如下错误:

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

I am not getting the same problem when I run it on a real device:

在真正的设备上运行时,我不会遇到同样的问题:

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

2 个解决方案

#1


54  

I've found the same thing, but only on emulators that have the Use Host GPU setting ticked. Try turning that off, you'll no longer see those warnings (and the emulator will run horribly, horribly slowly..)

我也找到了同样的东西,但只在有使用主机GPU设置标记的模拟器上。尝试关闭它,您将不再看到这些警告(并且仿真器将运行得非常、非常缓慢。)

In my experience those warnings are harmless. Notice that the "error" is EGL_SUCCESS, which would seem to indicate no error at all!

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

#2


2  

Fix: Unlock your device before running it.

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

Hi Guys: Think I may have a fix for this:

嗨,伙计们:我想我有办法解决这个问题:

Sounds ridiculous but try unlocking your Virtual Device; i.e. use your mouse to swipe and open. Your app should then work!!

听起来很荒谬,但试着打开你的虚拟设备;例如,用你的鼠标滑动和打开。你的应用程序应该可以工作了!

#1


54  

I've found the same thing, but only on emulators that have the Use Host GPU setting ticked. Try turning that off, you'll no longer see those warnings (and the emulator will run horribly, horribly slowly..)

我也找到了同样的东西,但只在有使用主机GPU设置标记的模拟器上。尝试关闭它,您将不再看到这些警告(并且仿真器将运行得非常、非常缓慢。)

In my experience those warnings are harmless. Notice that the "error" is EGL_SUCCESS, which would seem to indicate no error at all!

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

#2


2  

Fix: Unlock your device before running it.

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

Hi Guys: Think I may have a fix for this:

嗨,伙计们:我想我有办法解决这个问题:

Sounds ridiculous but try unlocking your Virtual Device; i.e. use your mouse to swipe and open. Your app should then work!!

听起来很荒谬,但试着打开你的虚拟设备;例如,用你的鼠标滑动和打开。你的应用程序应该可以工作了!