Windows 7, Android Studio 2.3
I has 3 emulators. And all success start from Android Studio.
But I want to start them from command line. So my steps (from command lines):
Success show all my emulators:
So I want to start one of them:
emulator -avd Nexus_3_7_API_17_ver_4_2_1
But I get error:
[8648]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ..\emulator\lib64\qt\lib
Could not launch '..\emulator/qemu/windows-x86_64/qemu-system-i386.exe': No such file or directory
Adding emulator path in Environmental Variables solved my problem. Now, I can run emulator command from anywhere.
You can achieve this by following these steps:
Add the following to Path variables in both boxes:
%USERPROFILE%\AppData\Local\Android\Sdk\emulator
Restart Command Prompt.
Note: Your path could be different than the one mentioned above. If this is the case, then you have to search for your emulator path.
For Mac user, similar to Pascal's answer, in Terminal type:
cd /Users/myname/Library/Android/sdk/tools
./emulator -adv mydevicename
For other mac users below might be what's needed.
cd ~/Library/Android/sdk/emulator
./emulator -avd Nexus_S_API_31 -change-locale fr-CA
my error when executing the followings:
emulator -avd Pixel_2_API_28
[4809612736]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/Users/myname/.android/../emulator/qemu/darwin-x86_64/qemu-system-x86_64': No such file or directory
I had the exact same issue and I am using a workaround. Let me explain:
There is a 'bug' in the emulator: it is not able to find the relative path
..\emulator\lib64\qt\lib
Incredibly awesome since this is so simple to fix... whatever.
Just cd to c:\path\to\your\android-sdks\emulator, typically something like
cd c:\Users\userName\android-sdks\emulator
then, in this directory, run any emulator command you want, for instance your command:
emulator.exe -avd Nexus_3_7_API_17_ver_4_2_1
in your teminal this will look like this:
c:\Users\userName\android-sdks\emulator> emulator.exe -avd Nexus_3_7_API_17_ver_4_2_1
and it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With