安卓emulator 命令行报错:could not launch ‘sdk-path/../emulator/qemu/darwin-x86_64/qemu-system-i38

2022/1/14 6:08:47

本文主要是介绍安卓emulator 命令行报错:could not launch ‘sdk-path/../emulator/qemu/darwin-x86_64/qemu-system-i38,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

安卓emulator 命令行报错:could not launch 'sdk-path/../emulator/qemu/darwin-x86_64/qemu-system-i38

  • 问题

问题

我的Mac上安装了android studio,但是我要再命令行使用 emulator ,所以我配置了环境。

ANDROID_HOME="/Users/yourname/Library/Android/sdk"
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools

然后再命令行 输入 emulator -avd Pixel_4_XL_API_25,报错:

[4408659392]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/Users/yourname/Library/Android/sdk/../emulator/qemu/darwin-x86_64/qemu-system-i386': No such file or directory

找到了解决办法:
https://stackoverflow.com/questions/34272026/could-not-launch-qemu-linux-x86-64-qemu-system-i386-no-such-file-or-directo

最简单的就是添加一个 alias:
alias emulator=${ANDROID_HOME}/emulator/emulator



这篇关于安卓emulator 命令行报错:could not launch ‘sdk-path/../emulator/qemu/darwin-x86_64/qemu-system-i38的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程