AVD管理器:AVD的模拟器进程被终止。AndroidStudio4.1.3和MacOSHighSierra10.13.6
我在对象中收到错误。我尝试进行所有检查(全部升级并正确安装),但仍然出现错误:
AVD 经理:
AVD 的模拟器进程被终止。
以下是模拟器的详细信息:
Name: Pixel_3a_API_30
CPU/ABI: Google Play Intel Atom (x86)
Path: /Users/simone/.android/avd/Pixel_3a_API_30.avd
Target: google_apis_playstore [Google Play] (API level 30)
Skin: pixel_3a
SD Card: 512M
fastboot.chosenSnapshotFile:
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: pixel_3a
hw.lcd.width: 1080
hw.initialOrientation: Portrait
image.androidVersion.api: 30
tag.id: google_apis_playstore
hw.mainKeys: no
hw.camera.front: emulated
avd.ini.displayname: Pixel 3a API 30
hw.gpu.mode: software
hw.ramSize: 1536
PlayStore.enabled: true
fastboot.forceColdBoot: no
hw.cpu.ncore: 4
hw.keyboard: yes
hw.sensors.proximity: yes
hw.dPad: no
hw.lcd.height: 2220
vm.heapSize: 256
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.audioInput: yes
image.sysdir.1: system-images/android-30/google_apis_playstore/x86/
showDeviceFrame: yes
hw.camera.back: virtualscene
AvdId: Pixel_3a_API_30
hw.lcd.density: 440
hw.arc: false
hw.device.hash2: MD5:0e6953ebf01bdc6b33a2f54746629c50
fastboot.forceChosenSnapshotBoot: no
fastboot.forceFastBoot: yes
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Google Play
runtime.network.latency: none
disk.dataPartition.size: 2G
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes
回答
修复:按照Codesign QEMU此处的指南进行操作。使用/Users/<username>/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64作为QEMU的目录(可能有所不同)。
我遇到的问题是qemu-system-x86_64. 在终端中运行模拟器会显示这个错误:cannot add library /Users/<username>/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed。
为了修复它,我找到了这些帖子:
Reddit
Codesign QEMU
回答
更新 - 28/4/2021
- 使用以下内容创建entitlements.xml文件:
<?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>
- 并根据需要在您的 SDK 所在的 qemu 路径上运行。
codesign -s - --entitlements entitlements.xml --force ~/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
答案基于https://www.arthurkoziel.com/qemu-on-macos-big-sur/
相关问题:
https://issuetracker.google.com/issues/181142249
https://issuetracker.google.com/issues/186436367
更新到 Android Emulator 3.5.6 现在应该修复它
原始解决方案 >>> 感谢 laalto
THE END
二维码