Android Studio 模拟器无法使用 API 27

标签 android android-studio

Android 模拟器无法使用 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

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

最佳答案

它清楚地显示错误:无法初始化 OpenglES 模拟,使用“-gpu off”禁用它。这意味着,您可以使用命令行开关-gpu off 以便使用“软件 GLES”渲染,或者只是升级您的显卡/安装 openGL 驱动程序。

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

关于Android Studio 模拟器无法使用 API 27,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48025133/

相关文章:

java - 在 kotlin 中首次构建 Room 数据库时如何修复异常

java - 无法解析 : core Affected Modules: app

java - Git push through Android studio 卡死了

java - JSON 单值数组

android - 在 gradle、Android Studio 中下载依赖项

java - Android studio 奇怪警告

不同模块中相同包的Android Studio编译错误

android - 如何从 ImageAdapter Grid View 类调暗 ImageView ?

java - Android Manifest 未找到其他 XML 资源

android - 如何获取用户当前在 Spotify 应用中收听的内容的信息