我正在尝试使用此命令启动模拟器 emulator -avd Pixel_4_API_30
但它给了我一个错误:
[8633370112]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/Users/primulax/../emulator/qemu/darwin-x86_64/qemu-system-aarch64': No such file or directory
Android Studio 规范:
Build #AI-203.7717.56.2031.7935034, built on November 21, 2021
Runtime version: 11.0.10+0-b96-7249189 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.2
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin```
最佳答案
我刚刚在一台新设置的机器上遇到了同样的问题,通过 SDK 管理器安装了模拟器等等。
错误消息实际上说明了一切:如果您在计算机上转到 /Users/primulax/../emulator/qemu/
,您会注意到当然没有 >darwin-x86_64
目录,但 darwin_aarch64
,因为您在 M1 机器上。不管是什么原因,模拟器在错误的目录中查找,如果您只是复制 darwin_aarch64
文件夹并将您的副本命名为 darwin-x86_64
,它会按预期工作。不理想,但在解决此路径问题之前,这是一种解决方法。
编辑:请查看@Andrew Stromme 的评论。当然,符号链接(symbolic link)是解决这个问题的更优雅的解决方案!
关于macos - 如何在没有 android studio 的情况下在 Mac M1 上启动 Android Emulator,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71015608/