I use Eclipse and run the ADT stuff within it. I tried to create a new Android virtual machine and kept getting the error mentioned in the title. I verified all permissions in all applicable directories, and still had no luck.
It turned out the problem was that I was running the ADT on 64-bit Linux (Mint 17, to be specific), and I needed to install a couple of 32-bit libraries. Here is the list:
libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Thanks to Pavel Kazlou for providing the list here:
This is a reminder of the steps required to use kvm/hardware acceleration in the Android Emulator, in case I need to re-do them.
They’re taken from here: https://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture#_Toc358213272
(The link also has instructions for Windows and Mac, in case any of you haven’t switched to Linux yet.)
In brief, the steps are:
- Verify hardware support by typing
egrep –c ‘(vmx|svm)’ /proc/cpuinfo
(result should not be 0).
- Install required packages:
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
- Add yourself to the kvm and libvirtd groups; log out and log in again.
- Install “Intel x86 Atom System Image” in Android SDK Manager
- (If using Eclipse, shut it down and restart it.)
- Create a new device in the Android Virtual Device Manager, selecting the new system image for the “CPU/ABI” option.
I wanted to use a method from the Apache Commons Lang library in an
Eclipse project. Here’s how to do that:
1. Download the library. (The Apache Commons Lang library is found here: http://commons.apache.org/proper/commons-lang/download_lang.cgi Select the version appropriate for your version of Java. You probably want the latest, unless you’re using an old, old version of Java. Also, get the binary rather than the source, unless you want to compile it for yourself.)
2. Create a “lib” folder in your Eclipse project. Right-click on the project name and select “New->Folder” Call the folder “lib”
3. Copy the jar into the folder you just created.
4. In Eclipse, find the jar file in the lib folder and right-click on it. Select “Build Path->Add to Build Path” The jar file will now be listed in your project under “Referenced Libraries.”