on Ubuntu 16.04 I have installed AndroidStudio and via its AVD manager GUI did create tow new devices. now on Terminal when I type emulator -list-avds
it lists the devices correctly, but when run emulator -avd <name>
I face errors:
[139684796983104]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/home/amir/../emulator/qemu/linux-x86_64/qemu-system-i386': No such file or directory
How should I solve it?
I'm pretty sure you can solve this by calling the emulator from the directory where it is installed: e.g.
Consider creating an env variable
$ANDROID_HOME
.If your directory matches my example above, set the variable to
/home/amir/Android/Sdk
(don't include tools).Some people report that this resolved the problem for them, so that they didn't even need to start the emulator from within the tools directory.
I cannot confirm this though, but it's easier to
cd $ANDROID_HOME/tools && emulator <name>
, isn't it?In Ubuntu 19.10!
With the environment variables already configured ($ANDROID_HOME), you should be able to list the AVDs, but if you are unable to start the AVD, do the following:
# Check the AVD target name
# But to start do:
or
Had this error recently on Arch Linux. Simplest resolution for me was to add an alias to
~/.profile
like this:alias emulator='cd /home/myusername/Android/Sdk/tools ; emulator
Then you can just use it normally, i.e.
emulator -avd <name>
without having to worry about switching directories beforehand.