运行Android应用程序时出错 - 无法初始化OpenglES仿真,请使用'-gpu off'禁用它

bui*_*ude 36 android android-virtual-device android-layout android-fragments android-activity

我是android编程的新手.我指的是google开发者网站,以学习android.当我运行应用程序UI时,我遇到了这些错误.

 H:\SDK\tools\emulator.exe -avd Nexus_5_API_21_x86 -netspeed full -netdelay none
 emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to   disable it.
 could not get wglGetExtensionsStringARB
 could not get wglGetExtensionsStringARB
 could not get wglGetExtensionsStringARB
 could not get wglGetExtensionsStringARB
 could not get wglGetExtensionsStringARB
 could not get wglGetExtensionsStringARB
 could not get wglGetExtensionsStringARB
 could not get wglGetExtensionsStringARB
 getGLES1ExtensionString: Could not find GLES 1.x config!
 Failed to obtain GLES 1.x extensions string!
 Could not initialize emulated framebuffer
Run Code Online (Sandbox Code Playgroud)

我正在使用android studio.

Les*_*ter 95

  • 转到AVD Manager.
  • 编辑您的AVD.
  • 在仿真性能上选择"Software GLES2.0"选项.(原因是有些用户没有安装图形显卡驱动程序)
  • 单击"完成"(保存).
  • 再次启动AVD. 在此输入图像描述

  • 非常感谢.你救了我这么多时间 (2认同)

4D *_*ver 70

我最近遇到了同样的问题,问题出现是因为AVD尝试使用系统的图形卡渲染图形而无法做到这一点,因为系统的图形驱动程序不是最新的,或者它不支持这个,所以这里是解决方案.

步骤1:

  • 更新操作系统图形驱动程序.
  • 重启系统.
  • 将系统的屏幕分辨率设置得尽可能高.
  • 尝试现在开始你的AVD.

第2步:

  • 如果步骤1失败,请转到AVD Manager.
  • 编辑您的AVD.
  • 取消选中"使用主机GPU"选项.
  • 单击"完成"(保存).
  • 再次启动AVD.


小智 6

配置新设备时,请在"仿真性能"类别下使用"软件 - GLES 2.0"选项.在配置AVD时单击"显示高级设置",将看到此选项.