今天更新到 macOS Big Sur 11.3 后,Android Emulator 无法启动 [英] Android Emulator can not start after update to macOS Big Sur 11.3 today
问题描述
我今天将 macOS 更新到 Big Sur 11.3,android 模拟器无法运行了:
I updated today the macOS to Big Sur 11.3, the android emulator can not work any more:
我的电脑:Macbook Pro 2019
My Computer: Macbook Pro 2019
Android Studio 版本:4.1.3
Android Studio Version: 4.1.3
安卓模拟器版本:30.5.5
Android Simulator Version: 30.5.5
消息:AVD xxx 的模拟器进程被杀死.
我尝试重新安装android studio并重新启动,但错误仍然相同.我无法启动 android 模拟器... :(
I tried reinstall the android studio and restart, but the error is still the same. I can not start the android Emulator... :(
错误在这里,它与GLDirectMem/Vulkan
有某种关系:
Error is here, It somehow related to GLDirectMem/Vulkan
:
你知道如何解决吗?
推荐答案
发生此错误的原因是 Apple 对虚拟机管理程序权利进行了更改.你想要做的是:
This error occurs because Apple has made changes to the hypervisor entitlements. What you want to do is:
使用
/Users/
作为/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 qemu<的目录/代码>
Use
/Users/<username>/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
as the directory forqemu
通过以下方式将权利添加到 qemu-system-x86_64
二进制文件:
Add the entitlement to the qemu-system-x86_64
binary by:
- 首先创建一个名为
entitlements.xml
的 xml 文件(不管在哪里),内容如下:
- First create an xml file named
entitlements.xml
(does not matter where) with this content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.hypervisor</key>
<true/>
</dict>
</plist>
- 然后用它对
qemu
二进制文件进行签名: - Then sign the
qemu
binary with it:
codesign -s - --entitlements entitlements.xml --force /Users/<username>/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
有关更多上下文,请参阅此处
For more context, refer here
这篇关于今天更新到 macOS Big Sur 11.3 后,Android Emulator 无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!