Beeware - “无法获得Android模拟器列表”在Mac上

发布于 2025-02-06 07:00:06 字数 214 浏览 2 评论 0原文

我正在尝试运行由MacOS上的Beeware和Python创建的Android应用程序。我跑了

briefcase run android

,我会收到以下消息,

Unable to obtain Android emulator list

这是怎么回事?我该怎么做才能找到并运行模拟器?

I am trying to run an android app created by BeeWare and python on MacOS. I run

briefcase run android

and I get the following message

Unable to obtain Android emulator list

What's going on here? What can I do to find and run the emulator?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤寂小茶 2025-02-13 07:00:06

如果您在M1机器上运行,这是解决方案。需要更新模拟器,因为默认情况下它具有Intel风味(Darwin),需要ARM架构。

  1. 前往〜/.briefcase/tools/android_sdk/emulator
  2. 从中下载M1-Preview引擎
    https://github.com/google/android-emulator- m1-preview/releases/tag/0.2
  3. https://github.com/google/android-emulator-m1-preview/releases/download/0.2/emulator-darwin-aarch64-0.2-engine-enly.zip
  4. cp -r仿真darwin-aarch64-0.2-仅引擎/*。
    (注意:darwin-aarch64-replace.sh zip文件中的文件,您可以检查,以查看如果没有失败,则可以查看适当的更新,因为它试图删除非非- 存在文件和文件夹)

如果您尝试运行./ emulator,则由于未设置环境变量而失败,因此请重试:公文包运行Android,您将获得奖励:

Select device:

  1) @Pixel_3a_API_31_arm64-v8a (emulator)
  2) Create a new Android emulator

if you are running on an M1 machine, this is the solution. The emulator needs to be updated, because by default it comes in Intel flavor (Darwin) and needs Arm architecture.

  1. Head to ~/.briefcase/tools/android_sdk/emulator,
  2. download the m1-preview engine from
    https://github.com/google/android-emulator-m1-preview/releases/tag/0.2
    (https://github.com/google/android-emulator-m1-preview/releases/download/0.2/emulator-darwin-aarch64-0.2-engine-only.zip)
  3. unzip the zip file
  4. cp -r emulator-darwin-aarch64-0.2-engine-only/* .
    (Note: There is a darwin-aarch64-replace.sh file inside the zip file that you can inspect to see what a proper update should look like if it didn't fail because it tries to delete non-existing files and folders)

if you try to run ./emulator it will fail because the environment variables are not set, so try again: briefcase run android and you will be rewarded with:

Select device:

  1) @Pixel_3a_API_31_arm64-v8a (emulator)
  2) Create a new Android emulator
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文