AppleSiliconAndroidStudio模拟器:错误:找不到模拟器可执行文件

我刚刚安装Android Studio 4.2.2Android Studio Preview (Arctic Fox Beta 5)我的苹果的Macbook M1。

创建模拟器 ( arm64) 时,我立即收到错误消息:

AVD Manager: The emulator process for AVD Pixel_4a_API_30 has terminated

然后我转到了 Android Studio 的日志文件(帮助 > 在 Finder 中显示日志),我看到当 Android Studio 尝试运行以下内容时发生错误:

~/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.

尝试了到目前为止我在网上找到的所有可能的解决方案......

回答

我遇到了同样的问题,并在阅读了m1 模拟器 GitHub 页面上的 README 后找到了一个简单的解决方案。

如果我是对的,那么正在发生的事情是您正在尝试启动为不同架构构建的映像。选择图片时,需要切换到“Other Images”选项卡,寻找ABI栏中注明arm64-*的图片。其他一切都应该在之后工作。

解决步骤

  1. 打开 AVD 管理器,然后单击 + Create Virtual Device
  2. 选择您想要的设备并单击 Next
  3. 将选项卡切换到“其他映像”
    Android Studio 选择 Arm64 虚拟设备映像
  4. 完成创建过程并运行您的应用程序。

以上是AppleSiliconAndroidStudio模拟器:错误:找不到模拟器可执行文件的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>