Reputation: 39519
With 25rc1 of the SDK tools I am having a problem when starting the emulators from $PATH
➜ ~ which emulator
/home/ligi/bin/android-sdk/tools/emulator
➜ ~ emulator @M
Could not launch './qemu/linux-x86_64/qemu-system-i386': No such file or directory
➜ ~ /home/ligi/bin/android-sdk/tools/emulator @M
console on port 5554, ADB on port 5555
Anyone knows a workaround? I could write a script to start emulators and cd in tools before but perhaps there is a better solution.
Upvotes: 29
Views: 31704
Reputation: 1277
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
emulator -list-avds
# But to start do:
$ANDROID_HOME/emulator/emulator @avd_name
or
/home/$USER/Android/Sdk/emulator/emulator @avd_name
Upvotes: 2
Reputation: 618
Do not use $ANDROID_HOME/tools/emulator
, it will cause error when you launch every time unless you change dir.
There is a another emulator in $ANDROID_HOME/emulator
.It is a good choice
Upvotes: 0
Reputation: 764
I encounter this one in android studio 2.3 which use new path for the emulator so try the following:
do not use emulator executable in the: sdk-path/tools/ directory but instead use the one found in the : sdk-path/emulator/
and also remove or rename the emulator found in the sdk-path/tools directory.
and because android sdk shipped with it's own libstdc++.so.6 you need to do the following to avoid the libGL error:
cd $ANDROID_HOME/emulator/lib64/libstdc++
mv libstdc++.so.6 libstdc++.so.6.bak
ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/emulator/lib64/libstdc++
Upvotes: 54
Reputation: 62519
yah my dns is blocked in the region i am visiting so i was searching for a way to add dns servers and start emulator at command line. default emulator in path did not work. instead go to your android SDK home and you'll see a emulator in there. use that emulator executable like this:
emulator -avd Nexus_5X_API_26 -dns-server 8.8.8.8,208.67.222.222,199.85.126.10,8.8.4.4
i think you can give 4 dns's. anyway this is a side note. back to the issue:
people here did not mention much that you need the -avd flag with it. wanted to point that out.
Upvotes: 0
Reputation: 4684
I had the Android Emulator
up to date under SDK Tools
. But I was still getting the error. Adding the following line to ~/.bash_profile
solved the problem for me:
PATH=$ANDROID_HOME/emulator:$PATH
Upvotes: 6
Reputation: 119
This one works for me on MacOS Sierra.
Preference -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools (tab)
Tick on Android Emulator and Apply
Upvotes: 8
Reputation: 195
If you're launching the emulator from command-line, try setting the current directory to your android sdk "tools" folder first.
This works for me as a workaround:
pushd ${ANDROID_HOME}/tools
emulator -avd ${EMULATOR_NAME} -wipe-data&
popd
Upvotes: 12
Reputation: 414
Try this, it work for me on Windows.
Tools -> Android -> SDK Manager -> SDK Tools -> Android Emulator
Then click on Apply.
Upvotes: 26
Reputation: 1801
In Virtual device configuration, set Emulated performance to Software GLES 2.0
Upvotes: 0
Reputation: 817
Make sure that ANDROID_EMULATOR_FORCE_32BIT is not set in your environment
Upvotes: 0