Why can't I run the android emulator?

2019-01-18 03:31发布

问题:

I have installed everything like I was told to by the android website and all I keep getting after I create my avd is

"Failed to start emulator: Cannot run program "/home/christopher/Desktop/android-sdk-linux_86//tools/emulator": java.io.IOException: error=2, No such file or directory".

Anybody got any ideas??? I'm running linux if that helps.

回答1:

If you're running a 64-bit system, you need to install ia32-libs:

sudo apt-get install ia32-libs


回答2:

If you are running Ubuntu 13.10 x64 or the latest Linux Mint x64 then the ia32-libs package is not available anymore. The solution which worked for me without any problems is to:

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1

Hope this will help!



回答3:

It's a lib32 problem, you need to install getlibs (http://frozenfox.freehostia.com/cappy/getlibs-all.deb) and run it against applications that do not work (e.g., adb and emulator).



回答4:

cmd from first comment didn't worked for me (Crunchbang linux) so I solved this problem with

sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6



回答5:

In directory tools, there are many types of emulator, while my computer works with emulator64-arm! My system is Linux Mint 16 amd64! Good luck!

./emulator64-arm @yxphone -sdcard yxsd -scale 0.8


回答6:

Another alternative to that, and one in which you will not need to add archs or install anything, is going to the android-sdk install directory, and then to tools dir. There you'll find the emulator executable and plenty other emulator executables too. Since the emulator file seems to actually be a chooser to which one of the others it will launch based on your OS arch (the problem is that the file itself is a 32bit executable), you can just rename it to emulator.old or something and then make a symlink named emulator to the correct file (mine was emulator64-x86 for amd64 arch). So...

cd (...)/android-sdk/tools/
mv emulator emulator.old
ln -s emulator64-x86 emulator

And it should work! The downside for this is that you'll probably have to do it everytime you update the SDK Tools and also will only fix the emulator, adb and some other tools will have the same problem! Anyways, still an alternative!



回答7:

64-bit system needs to install ia32-libs and it is working with latest Linux Mint 16 Cinnamon. I have used this. Just run Commands in terminal

sudo apt-get install ia32-libs
sudo apt-get update


回答8:

Try this, for me work fine

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386