Android 模拟器 30.4.5 不适用于 MacOS [英] Android Emulator 30.4.5 not working on MacOS

查看:43
本文介绍了Android 模拟器 30.4.5 不适用于 MacOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

系统信息

MacOs 版本 - 11.3 测试版

MacOs Version - 11.3 Beta

Android Studio 版本 - 4.1.2

Android Studio Version - 4.1.2

Android 模拟器版本 - 30.4.5

Android Emulator Version - 30.4.5

Android HAXM 版本 - 7.5.1

Android HAXM Version - 7.5.1

错误堆栈

emulator: Android emulator version 30.4.5.0 (build_id 7140946) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library /Users/rajaparikshit/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
HVF error: HV_ERROR
qemu-system-x86_64: failed to initialize HVF: Invalid argument
Failed to open the hax module
No accelerator found.
qemu-system-x86_64: failed to initialize HAX: Operation not supported by device
added library /Users/rajaparikshit/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library /Users/rajaparikshit/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
added library /Users/rajaparikshit/Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib

Android 模拟器版本 - 30.0.26 按预期完美运行.但是30.4.5.0更新后就不行了.

Android emulator version - 30.0.26 was running perfectly as expected. But after 30.4.5.0 update its not working.

我试图搜索降级到 30.0.26 的方法,但我找不到,即 android studio manager 中也没有任何选项.

I tried to search way to downgrade to 30.0.26 but I couldn't find one i.e. there is no any option in android studio manager also.

我看到了这篇 SO 帖子.Google 将所有模拟器版本存储在存储库 URL - http://dl.google.com/android/repository/ 但我不知道 30.0.26 版本的构建版本,所以不能走这条路.

I saw this SO post. Google store all the emulators version in repository URL - http://dl.google.com/android/repository/ but I didn't know the build version for 30.0.26 version so couldn't go this way.

更新 -

请按照下面接受的答案进行投票.

Please follow the accepted answer below and do give upvote.

对于新手或遇到任何问题,请按照以下步骤操作:

For newbies or if you get stuck at any point please follow the steps:

  1. 如果您卸载了最新版本的模拟器,因为它不起作用,请重新安装.(因为如果我们手动替换模拟器目录,Android Studio 将无法识别它,因此您将无法从 Android Studio 创建/运行 AVD)

  1. If you have uninstalled the latest version of emulator as its not working, then please install it again. (Because if we manually replace the emulator directory Android Studio is not able to recognise it and hence you won't able to create/run AVD from Android Studio)

从答案中提到的 URL 下载 zip 文件.

Download the zip file from the URL mentioned in answer.

将内容复制(不移动)到您的原始模拟器目录.

Copy(Not Move) the content to your original emulator directory.

如果需要,重新启动 android studio.

Restart the android studio if needed.

这仍然只是一种解决方法,这个新版本的实际问题仍然存在.

Still this is just a workaround, actual issue with this new version is still there.

推荐答案

这是模拟器修订版 30.0.26 的链接 https://dl.google.com/android/repository/emulator-darwin-6885378.zip(取自此答案)

Here is the link for the emulator revision 30.0.26 https://dl.google.com/android/repository/emulator-darwin-6885378.zip (taken from this answer)

下载并复制已安装的模拟器.

Download it and then copy over the installed emulator.

如果您启用了文件隔离,它将无法工作;我这样做了,我需要从下载的文件中递归删除隔离

It won't work if you have files quarantine enabled; I did so I needed to remove quarantine recursively from downloaded files

xattr -r -d com.apple.quarantine /path/to/dir

然后我可以通过调用运行模拟器:

Then I can run the emulator by invoking:

emulator @device_name

它似乎没有被 AS 检测到,但仍然有效.

It doesn't seem to be detected by AS, but works nonetheless.

这篇关于Android 模拟器 30.4.5 不适用于 MacOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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