Get Your Android Development Environment Running in Windows

I was catching up on some Hanselminutes the other day, in particular show #294 Developing a mobile app for iPhone, Windows Phone 7 and Android with Toran Billups caught my attention. I’ve done development on all three platforms so I had fun comparing and contrasting his experiences, and I agree with a lot of Toran’s points.

Since Android is my the target of my current project I thought I’d write up a quick how-to for getting your IDE all set up for development. I agree that it is not as straightforward as the iPhone/windows phone experiences might be. But it can be a lot less painful these days than it use to be. So here’s my quick guide to getting up and running quickly.

This guide targets Eclipse. It’s really not that scary. If you’re not familiar with Eclipse, like any new tool, once you get use to how it works I think you’ll find it to be a competent environment. Maybe it’s not the most beautiful or elegant piece of software, but it certainly gets the job done.

Get the Basics First things first, you need the Java Development Kit and Eclipse itself. Now you might be tempted to head over to Oracle’s sites for the JDK. I urge you not to, they clearly didn’t design it for human interaction or optimize for usability. Instead, head on over to http://ninite.com and install from there. It’s quick and easy, and while you’re at it you may want to pick up some of the other handy utilities they have. Select your tools, click the big Get Installer button and let it work for you.

Install Eclipse + JDK


Install the ADT Plugin

Fire up eclipse (by default it gets installed in C:eclipse. yeah, it’s not perfect) and prepare to install the Android Developer Tools plugin. This provides the necessary extensions within Eclipse for android development. If you want all the in depth details check out the ADT page in the sdk documentation. Here’s the quick version. In the Eclipse menu, select Help -> Install New Software… then Click the Add… button on the far right to add a new repository. The resulting dialog requires two fields a name and location. For the name use ADT, or whatever suits you. The location is: https://dl-ssl.google.com/android/eclipse/

Click OK and once the information loads, hit Select All to select all the options and Next> to start the install process. There are a couple clicks after that to accept license agreements and unsigned content. Confirm those and installation should proceed.

Once complete Eclipse will ask to restart. Let it do so.

Configure the SDK
After you restart Eclipse a dialog will pop up prompting you to configure the Android SDK. The SDKs allow you to develop against various Android OS versions. At the very least you’ll need one. Install the latest, add 2.1 if it suits you. You can always go back and add more as we’ll see later.

Click next, after a little downloading you’ll be asked to accept some more license agreements. Accept and continue with the sdk downloads.

Start Developing
At this point you’ve got all the basics you need to start developing for the Android platform. Hopefully you have a real life hardware device at hand to test with. The Emulator is usable for limited testing, but very slow. And by slow, I mean f*cking slow.

At this point you’re probably ready for Hello World. There are a few more steps to it, the documentation here covers that in a straightforward manner.

After that, you might want to examine some of the sample projects. You’ll need to add samples via the Android SDK Manager. The ADT plugin added a toolbar item for it (look for the green android), but you can also get to it via the Window Menu. (It’s also worth noting that the AVD Manager is the tool you’ll use for creating emulators, and can be reached from this menu as well).

The SDK Manager basically gives you a tree view of the different SDKs and options within them. Look for the version you want to target and select the Samples for SDK Item and click install.

Once that is done you can choose File->New->Project… to open the New Project Wizard. Open the Android Folder and Select Android Sample Project. Click Next, select your SDK target, Next, then choose a sample to create within your workspace. This page lists many of the samples with links to some details on their function.

Digging Deeper If you are unfamiliar with Android development, the steps above will get you a platform to start with, but you’ll still have a lot of learning ahead. There is a wealth of information on the Android Developer site. You can read further on the SDK and more details about installing and configuring it here.

While the process is certainly more involved than it should be, it’s more lengthy than difficult. I’ve definitely suffered through worse. Over the past year or two the tools and process have improved, so here’s to hoping Google is focusing on continuing to make the process faster and simpler in the future.