Monthly Archives: March 2014

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!

 

Why Start a Professional Blog

Being new to the blog world, this seems like a natural first post. So, what in the world made me want to do this? To start writing to an anonymous public, and at this early point, to actually be writing to well… no one?

Hopeful Benefits

I know that no one is going to come to my blog immediately.  It takes time.  I have no fantasy of people everywhere pushing others out of the way to get to a computer because the great Matthew Urch started a blog!  And as such, many of the reasons I chose to start this are eventual; they happen later.  What are they?

Becoming Known as an Expert

After enough posts, and somehow earning enough visits per day (with the wonderful assumption that my posts are high quality), visitors will start to get the feel that hey, this guy knows what he’s talking about.  Which would be a little tiny bit awesome.

Once that happens, it leads nicely to the next hopeful benefit.

Job Opportunities

This benefit is probably one of the last ones to come around from a successful blog, but it’s definitely not a con.  I won’t get angry if I check and there are a few emails from people who want to give me interviews.  I promise.

Anyways, my philosophy for job opportunities is anything that helps you gain the image of someone who knows what they’re talking about, is a good thing.  So if I can achieve the previous benefit, while some of my visitors are recruiters, I feel the dominos are placed in such a way that I can bring jobs to me.

Benefits Independent Of Views

Another way to think of this category is things that I will get out of this blog, just by it existing.  If I actively post on here, and no one visits it, do I still get anything from it?  I’d argue yes.

Better Writing Skills

The job of a developer doesn’t typically nurture excellent writing skills.  Or even plain communication skills.

while( point.isNotUnderstood() ) {
   point.make() ;
}

Code is written, but it’s purely logic based, and the emails tend to be short and to the point.  The documentation is often non-existent or worse than the code.

But a blog requires real English!  I’m an avid reader and have always toyed with the idea of writing a novel, retiring wealthily from the inevitable movie deal, but I’ve never taken a serious stab at it.  This blog gives me an outlet where I can write what I know.  And like anything, my writing skills will improve with practice.

A Deeper Understanding of a Subject

Whenever I come across a problem while coding, I’ll often fix it, quietly appreciate my genius, and move on.  If someone else comes across the same problem, even if that someone is a future me, there’s no written record anywhere to allow that someone to make use of my experience.  So with this I have a place to write it.

However, since this is a public outlet of my knowledge, I won’t simply write up a post with my steps.  I’ll research the problem, finding pros and cons, and best practices for actually solving the problem the best way possible.  The result will be a structured document with far more knowledge than I started with, and the process will have increased the knowledge in my brain.

PS

Oh, and the whole thing seems fun!