【问题标题】:Android Studio Emulator not working with API 27Android Studio 模拟器不适用于 API 27
【发布时间】:2017-12-29 15:58:29
【问题描述】:

Android Emulator 无法与 Api 27 一起使用并给我这个错误:

    5:36 PM Emulator: init: Could not find wglGetExtensionsStringARB!

    5:36 PM Emulator: emulator: ERROR: Missing initial data partition file: C:\Users\ACER\.android\avd\Nexus_5_API_27_1.avd/userdata.img

    5:36 PM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!

    5:36 PM Emulator: Failed to obtain GLES 2.x extensions string!

    5:36 PM Emulator: Could not initialize emulated framebuffer

    5:36 PM Emulator: emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.

    5:36 PM Emulator: Process finished with exit code -1073741819 (0xC0000005)

    5:51 PM Emulator: qemu-system-i386.exe: Unable to open C:\Users\ACER\.android\avd\Galaxy_Nexus_API_25.avd\data\misc\pstore\pstore.bin: Permission denied

    5:51 PM Emulator: Process finished with exit code 0

图形设置是自动的,当我选择软件图形时,模拟器只会显示空白屏幕。

【问题讨论】:

标签: android android-studio


【解决方案1】:

它清楚地显示ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.,这意味着您可以使用命令行开关-gpu off 以使用“软件GLES”进行渲染,或者只是升级您的显卡 / 或安装openGL驱动程序。

参见release notes,有两个新的命令行开关:-gpu swiftshader_indirect-gpu angle_indirect。虽然这个问题可能缺少一个小细节:您使用的是哪个 CPU、多少 RAM 和哪个图形适配器?除非有合适的硬件可用,否则您必须取消勾选“使用 Host Gpu”复选框。

【讨论】:

  • 谢谢,你真的拯救了我的一天。更新后有点奇怪,我通常在没有gpu 开关的情况下运行我的模拟器,并且在我更新它之前运行良好。出现错误后,我尝试使用-gpu off 开关,但我的模拟器的性能下降了很多,但是通过使用-gpu switftshader_indirect,我的模拟器似乎更流畅了。你知道原因吗?
  • @Nanangarsyad 那是因为-gpu off 是一个纯软件光栅化器(很可能直接渲染) - 而-gpu switftshader_indirect 是 SwiftShader OpenGL ES 驱动程序,具有间接渲染功能(两者都在 CPU 上运行,而不是GPU)。见swiftshader.googlesource.com/SwiftShader
【解决方案2】:

您可以尝试使用 Genymotion 模拟器。也许这(暂时)可以解决您的问题。

【讨论】:

  • 这与问题有什么直接关系?有很多这些“使用 Genymotion”的答案,而 OP 没有要求替代方案。类似“我有一个 Windows 问题”-“你可以安装 Linux”的题外话。
  • 这就是为什么我说这只是一个临时解决方案。没有其他答案,所以我认为解决问题的快速方法是切换模拟器。抱歉,我试图提供帮助。天哪!
猜你喜欢
  • 2017-07-17
  • 2020-09-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-12-28
  • 1970-01-01
  • 2018-10-29
  • 1970-01-01
相关资源
最近更新 更多