安卓模拟器 - 意外的'-prop'值

3

我已经经常看到这个错误了,但是在一台搭载Apple M1芯片的2020款Macbook Pro上使用Visual Studio 2019 for Mac时却没有遇到过。

当我尝试启动Android模拟器时,会出现一个错误:“意外错误”。

当我通过Visual Studio进入Android设备管理器时,选项有限,但试图启动模拟器会出现众所周知的错误:

设备错误: 警告:意外的“-prop”值(“monodroid.avdname=pixel_2_pie_9_0_-_api_28”),只支持“qemu.”属性警告:意外的“-prop”值(“emu.uuid=7698980f-2d31-4db3-973b-df409a67754d”),只支持“qemu.”属性

查看此日志,最后显示如下内容(格式化为代码以保留换行符):

[2021-05-10 18:39:15.0] 
emulator: registered 'boot-properties' qemud service
[2021-05-10 18:39:15.0] 
emulator: Adding boot property: 'qemu.cmdline' = 'androidboot.logcat=v:* androidboot.consolepipe=qemu_pipe,pipe:logcat'
[2021-05-10 18:39:15.0] 
emulator: Adding boot property: 'qemu.logcat' = 'start'
[2021-05-10 18:39:15.0] 
emulator: CPU Acceleration: DISABLED
[2021-05-10 18:39:15.0] 
emulator: CPU Acceleration status: Android Emulator requires an Intel processor with VT-x and NX support.  (VT-x is not supported)
[2021-05-10 18:39:15.0] 
emulator: ERROR: x86 emulation currently requires hardware acceleration!
[2021-05-10 18:39:15.0] 
CPU acceleration status: Android Emulator requires an Intel processor with VT-x and NX support.  (VT-x is not supported)
[2021-05-10 18:39:15.0] 
More info on configuring VM acceleration on macOS:
[2021-05-10 18:39:15.0] 
https://developer.android.com/studio/run/emulator-acceleration#vm-mac
[2021-05-10 18:39:15.0] 
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
[2021-05-10 18:39:15.0] 

[2021-05-10 18:39:15.0] 

这个指南或尝试按照这个操作似乎是不可能的。

我不确定从哪里开始使其工作;在我的旧iMac上可以正常运行。

谢谢!


我也在使用AMD Ryzen 3 1200时遇到了这个错误。 - Jayowl
2个回答

0

是的,在Macbook Pro上使用M1芯片组的VS 2019中,Android设备管理器无法工作,因为M1采用了ARM架构。您可以尝试在VS的Android设备管理器中创建一个带有arm64-v8a的模拟器,它不会抛出任何异常,但只会显示一个空白屏幕。

因此,有两种方法可以解决这个问题。对于永久性修复,您可以安装Android Studio,并在其设备管理器中,在其他选项卡中安装基于arm64-v8a的模拟器映像,它将正常工作(如果一次不起作用,请尝试2-3个模拟器),另一种修复方法是临时性的,您可以按照链接https://medium.com/techiepedia/setting-up-android-emulator-in-m1-mac-fff58ec8bff8并下载链接(初始预览3):https://github.com/google/android-emulator-m1-preview/releases

虽然存在一些已知问题,但对于基本调试,您可以使用它。


0

看起来安卓正在开发一个更新版本的模拟器,支持M1芯片。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接