Cannot start Android emulator from cmd line in Mac

2019-05-06 18:48发布

问题:

From about 2 weeks ago, I cannot launch Android Emulator from Command line on mac os x, unless i am in android sdk's tools folder. The emulators launch from the AVD Manager fine.

I start emulator with this command

"emulator -avd Nexus_6p_API_23"

And, got error message below

"[140736029389760]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib Could not launch '../emulator/qemu/darwin-x86_64/qemu-system-x86_64': No such file or directory"

Anyone has idea about this?

回答1:

Try this:

/Users/[your_name]/Library/Android/sdk/tools/emulator -avd Nexus_6p_API_23

A free script for you

start_6p_23.sh:

#!/bin/bash
/Users/[your_name]/Library/Android/sdk/tools/emulator -avd Nexus_6p_API_23