Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot start Android emulator from cmd line in Mac OS X

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?

like image 505
jarly Avatar asked Mar 07 '17 11:03

jarly


People also ask

How do you start an emulator from command line?

Starting the emulator Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager. Here's the basic command-line syntax for starting a virtual device from a terminal prompt: emulator -avd avd_name [ {- option [ value ]} … ]

Why is my AVD not working?

On ChromeOS, Android Virtual Devices (AVDs) might fail to launch because the libnss3 dependency is missing. To launch the AVDs successfully, run sudo apt install libnss3 to manually install the libnss3 library.


1 Answers

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
like image 71
Peike Avatar answered Oct 13 '22 01:10

Peike