Apple Silicon Android Studio 模拟器:错误:找不到模拟器可执行文件 [英] Apple Silicon Android Studio emulator: ERROR: can't find the emulator executable
问题描述
我刚刚在我的 Apple M1 Macbook 上安装了 Android Studio 4.2.2
和 Android Studio Preview (Arctic Fox Beta 5)
.
I just installed Android Studio 4.2.2
and Android Studio Preview (Arctic Fox Beta 5)
to my Apple M1 Macbook.
在创建模拟器 (arm64
) 时,我立即收到错误:
When creating an emulator (arm64
) I immediately receive the error:
AVD Manager: The emulator process for AVD Pixel_4a_API_30 has terminated
然后我转到了Android Studio的日志文件(Help > Show log in Finder),我看到Android Studio尝试运行以下内容时发生错误:
I then went to the log file of Android Studio (Help > Show log in Finder) and I see that the error occurs when Android Studio attempts to run the following:
~/Library/Android/sdk/emulator/emulator -netdelay none -netspeed full -no-snapshot-load -avd Pixel_4a_API_30
输出:
emulator: Android emulator version 30.3.5.0 (build_id 7036990) (CL:N/A)
emulator: ERROR: can't find the emulator executable.
尝试了迄今为止我在网上找到的所有可能的解决方案...
Tried every possible solution I found online so far...
推荐答案
在阅读 m1 模拟器 GitHub 页面.
如果我是对的,那么正在发生的事情是您正在尝试启动为不同架构构建的映像.选择图片时,需要切换到其他图片".选项卡并查找 ABI 列中带有 arm64-* 的图像.其他一切都应该在之后工作.
If I'm right, what is happening is that you're trying to boot an image built for a different architecture. When selecting the image, you need to switch to the "Other Images" tab and look for an image with arm64-* stated in the ABI column. Everything else should work after.
解决步骤
- 打开 AVD 管理器并点击
+ Create Virtual Device
- 选择您想要的设备并点击
Next
- 将标签切换到其他图像";Android Studio 选择 Arm64 虚拟设备镜像
- 完成创建过程并运行您的应用.
这篇关于Apple Silicon Android Studio 模拟器:错误:找不到模拟器可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!