Could not launch './qemu/linux-x86_64/qemu-system-i386': No such file or directory

你离开我真会死。 提交于 2019-12-10 00:47:47

问题


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.


回答1:


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++  



回答2:


Try this, it work for me on Windows.

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

Then click on Apply.




回答3:


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



回答4:


This one works for me on MacOS Sierra.

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

Tick on Android Emulator and Apply




回答5:


Make sure that ANDROID_EMULATOR_FORCE_32BIT is not set in your environment




回答6:


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




回答7:


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



回答8:


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.




回答9:


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



来源:https://stackoverflow.com/questions/34272026/could-not-launch-qemu-linux-x86-64-qemu-system-i386-no-such-file-or-directo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!