29

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.

ligi
  • 39,001
  • 44
  • 144
  • 244

10 Answers10

52

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++  
NickUnuchek
  • 11,794
  • 12
  • 98
  • 138
Mustafa R.Mahdi
  • 744
  • 7
  • 11
25

Try this, it work for me on Windows.

Tools -> Android -> SDK Manager -> SDK Tools -> Android Emulator

Then click on Apply.

enter image description here

creativecreatorormaybenot
  • 114,516
  • 58
  • 291
  • 402
Iaoceot
  • 384
  • 4
  • 9
11

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
user597159
  • 185
  • 1
  • 4
8

This one works for me on MacOS Sierra.

Preference -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools (tab)

Tick on Android Emulator and Apply

Community
  • 1
  • 1
Neo Nguyen
  • 119
  • 1
  • 3
5

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
Manoj Shrestha
  • 4,246
  • 5
  • 47
  • 67
2

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

Cesar Devesa
  • 990
  • 6
  • 14
0

Make sure that ANDROID_EMULATOR_FORCE_32BIT is not set in your environment

Steve Bradshaw
  • 827
  • 7
  • 10
0

In Virtual device configuration, set Emulated performance to Software GLES 2.0

rexxar
  • 1,671
  • 1
  • 21
  • 27
0

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.

j2emanue
  • 60,549
  • 65
  • 286
  • 456
0

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

Angel F Syrus
  • 1,984
  • 8
  • 23
  • 43
LitileXueZha
  • 512
  • 6
  • 11