Android Studio 模拟器:无法添加库 vulkan-1.dll:失败 [英] Android Studio Emulator: cannot add library vulkan-1.dll: failed

查看:120
本文介绍了Android Studio 模拟器:无法添加库 vulkan-1.dll:失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 64 位 Windows 10 Pro 中从 Android Studio 运行模拟器时,它显示以下错误:

When I run the emulator from Android Studio in Windows 10 Pro 64-bit, then it shows the below error:

13-01-2021
10:42 AM    Emulator: handleCpuAcceleration: feature check for hvf

10:42 AM    Emulator: cannot add library vulkan-1.dll: failed

10:42 AM    Emulator: cannot add library vulkan-1.dll: failed

10:42 AM    Emulator: Process finished with exit code -1073741819 (0xC0000005)

而且模拟器没有打开.我已经卸载了当前版本(4.1.1)并安装了Android Studio 4.0.1,但问题没有解决.现在我使用的是最新版本的 Android Studio,即 4.1.1.

And the emulator is not opening. I've uninstalled the current version (4.1.1) and installed 4.0.1 of Android Studio, but problem is not solved. Now I'm in the latest version of Android Studio i.e., 4.1.1.

这是flutter doctor的输出:

推荐答案

Android 6

如果您使用的是 Android 6 及更高版本但低于 Android 10Emulator 然后重新创建 Emulator 并选择 Software – GLES 2.0 in创建 AVD(或编辑现有 AVD)时的模拟性能.

For Android 6

If you’re using Android 6 and above but less than Android 10 in Emulator then Re-Create the Emulator and Select Software – GLES 2.0 in the Emulated Performance while creating the AVD(or edit existing AVD).

如果您使用的是 Android 10 或 11,则无法更改 Emulated性能(图形)

If you’re using Android 10 or 11, then you can’t change the Emulated Performance (Graphics)

为此,编辑 AVD 的 config.ini 文件.在 Windows 下是位于 C:/Users//.android/avd//config.ini(在我的例子中是 Nexus_5X_API_29.avd).

So for that, Edit the config.ini file of the AVD. Under Windows it’s located under C:/Users/<user_name>/.android/avd//config.ini (in my case is Nexus_5X_API_29.avd).

在文本编辑器中更改行

hw.gpu.mode=auto

hw.gpu.mode=off

(即使在 Android Virtual Device 中打开此设置也会保留Android Studio 经理.它只是在那里不可编辑.

(This setting remains even if opened in the Android Virtual Device Manager of Android Studio. It’s just not editable there.

我也试过这个,这是我在另一个 AVD 中发现的:

I also tried this, which I found in another AVD:

hw.gpu.enabled=yes
hw.gpu.mode=software

但是这随后被 Android 虚拟设备更改为no"/off"经理.到目前为止我没有再看下去.hw.gpu.mode=off 适用于我).

But this is then changed to "no" / "off" by the Android Virtual Device Manager. I didn’t look any further so far. hw.gpu.mode=off worked for me).

重新发布从 OP 中删除答案(仅 10k 链接),其中包含实际内容,最初来自 https://professnow.com/blog/solved-emulator-cannot-add-library-vulkan-1-dll-failed/

Re-posting the deleted answer from OP (10k link only) with the actual content included, originally from https://professnow.com/blog/solved-emulator-cannot-add-library-vulkan-1-dll-failed/

这篇关于Android Studio 模拟器:无法添加库 vulkan-1.dll:失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆