egl_仿真未能建立与主机- android的连接

时间:2022-04-17 15:54:33

I am trying to run a simple OpenGL program in Android. I am running this in an Android 4.1 emulator. I switched on its GPU emulation and it worked fine yesterday. When I ran that today, initially it was hanging saying, OpenGL taking time to render - Wait or Close dialog box. After few runs again it was crashing saying

我想在Android上运行一个简单的OpenGL程序。我正在运行一个Android 4.1模拟器。我打开它的GPU仿真,昨天它运行得很好。当我今天运行它时,最初它是挂起说,OpenGL花时间渲染-等待或关闭对话框。又跑了几圈后,它开始崩溃了

E/EGL_emulation(2637): Failed to establish connection with the host

followed by

紧随其后的是

11-30 11:48:10.787: E/AndroidRuntime(2637): FATAL EXCEPTION: main
11-30 11:48:10.787: E/AndroidRuntime(2637): java.lang.IllegalArgumentException: eglChooseConfig failed EGL_NOT_INITIALIZED
11-30 11:48:10.787: E/AndroidRuntime(2637):     at android.view.HardwareRenderer$GlRenderer.chooseEglConfig(HardwareRenderer.java:852)
11-30 11:48:10.787: E/AndroidRuntime(2637):     at android.view.HardwareRenderer$GlRenderer.initializeEgl(HardwareRenderer.java:804)
11-30 11:48:10.787: E/AndroidRuntime(2637):     at android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:747)
11-30 11:48:10.787: E/AndroidRuntime(2637):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1505)
11-30 11:48:10.787: E/AndroidRuntime(2637):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
11-30 11:48:10.787: E/AndroidRuntime(2637):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)

I guess the emulator is not able to take control of the GPU of the system, so how do I avoid this error? How do I rectify this problem?

我猜模拟器无法控制系统的GPU,我该如何避免这个错误呢?我如何解决这个问题?

Thanks in advance. :)

提前谢谢。:)

2 个解决方案

#1


63  

This happens to me when my computer came out standby. Restart your virtual device.

这发生在我的电脑出现待机状态时。重新启动虚拟设备。

#2


14  

I was having the same problem in my Genymotion emulator while running a webview based application,I have restarted the emulator and it worked fine

在运行基于webview的应用程序时,我在Genymotion模拟器中遇到了同样的问题,我重新启动了模拟器,它运行得很好

#1


63  

This happens to me when my computer came out standby. Restart your virtual device.

这发生在我的电脑出现待机状态时。重新启动虚拟设备。

#2


14  

I was having the same problem in my Genymotion emulator while running a webview based application,I have restarted the emulator and it worked fine

在运行基于webview的应用程序时,我在Genymotion模拟器中遇到了同样的问题,我重新启动了模拟器,它运行得很好