Category Archives: Android Development

Android SDK requires ADT version X or Above

Alright let’s do some Android development!  Let me just open up Eclipse and…sdk requires version x - initial error

Okaaaay… That’s strange, check for updates, then.

sdk requires version x - no updates found

What?!  🙁

Let’s fix it!

This is actually a fairly easy fix, it’s just a little confusing.  You’ll want to go to:

Help | Install New Software

And then add a new source:

http://dl-ssl.google.com/android/eclipse/

sdk requires version x - found updates

These are the updates you want!  So go ahead and update!

sdk requires version x - while contacting update sites

OH, come on!

Don’t worry!  That error only happens if you leave “contact all update sites during install to find required software” checked.  Simply ensure that you uncheck that box before you go through with the update.

sdk requires version x - uncheck evil box

And then you should be good to go!

Speeding Up the Android Emulator with Intel HAXM

When I first started developing in Android, putting the finishing touches on my various Hello World style apps, I couldn’t help but notice just how slow the emulator would run.  I eventually switched to using my phone instead of the emulator, since it was leaps and bounds smoother.  But the emulator can be sped up, both significantly, and easily.

Allow me to introduce you to Intel HAXM, or “Hardware Accelerated Execution Manager”.  Which Intel defines as:

…a hardware-assisted virtualization engine (hypervisor) that uses Intel Virtualization Technology (Intel® VT) to speed up Android app emulation on a host machine.

Setting it up in your environment is actually surprisingly easy, and the official guide isn’t too complicated to follow.  Here though, I’m going to summarize the installation and setup in point form.

Requirements

  • Android SDK – version 17+
  • Intel® processor with support for Intel VT-x, EM64T, and Execute Disable Bit functionality – (The install process verifies this prerequisite for you – see “Step 2” below)
  • 1GB+ of RAM

Step 1 – Download HAXM and Images

Fire up your trusty SDK Manager and peruse the “Extras” section down at the bottom.  The item you’re going to install is “Intel x86 Emulator Accelerator (HAXM)”

intel haxm in sdk

While you’re in the SDK, select the Intel “Atom System Image” for whichever APIs you wish to run in your emulator.

intel system image

The SDK Manager merely downloads HAXM for you, even though it will say “Installed”, it’s a tad misleading.  Which brings us to our next step

Step 2 – Installing HAXM

Locate HAXM, which the SDK should’ve downloaded it here for you:

<root sdk directory>extrasintelHardware_Accelerated_Execution_Manager

Open that directory and run “IntelHaxm.exe” to install it.  If your system is not capable of running HAXM, the install will fail, according to Intel:

Intel HAXM installation will fail if your system does not meet the system requirements, including support for Intel processor features, such as Intel Virtualization Technology (Intel VT).

Step 3 – Setup a New Android Emulator

Note: If you see “No system images installed for this target”, refer to the “Troubleshooting” section below.

When creating a new Android Virtual Device (emulator), select the API level that you installed the intel image for, and then select “Intel Atom” for the CPU/ABI option.  It also helps to check “Use Host GPU”

intel atom

Troubleshooting

“No system images installed for this target”

Something I’ve run into during this process is that when I would try to setup a new emulator, the CPU/ABI section would say “No system images installed for this target”:

no system images installed

What in the world? But we did installed system images…  Don’t worry, it’s a fairly easy fix.  Navigate to here (substitute the 19 with whichever version you want to use):

<root sdk directory>system-imagesandroid-19

Do you see a “default” subfolder?  Rip the contents from there and place it directly underneath android-XX, essentially you want to eliminate the “default” folder, moving all of it’s contents up one level to where the default folder was.  Then give eclipse a good ol’ restart, and it should be fixed!