Setting Up Your Android Dev Environment

AndroidBuilding your first Android app, however primitive, requires the proper build environment. Here’s some things to bear in mind as you get going.

First, you’ll need to set up your workspace before you begin. For an IDE, the most commonly used is Eclipse, though you can develop from the command line, without an IDE, if you prefer. Or, you can use device maker IDEs. Motorola, Intel and HTC all maintain their own sets of custom Android development tools.

In this post, I’ll focus on the set up of your development environment and virtual devices in preparation for building your first app. Before you begin, make sure that you have plenty of time for downloading the Eclipse and Android development packages. Depending on your connection speed, you may need to set aside considerable time just to get them installed. Some tools are over 100mb in size. Tell your firewall and Internet content filter — if you use one — to behave and let you work. This will save you much frustration and a later face palm when you realize you only needed to allow Java updates and Eclipse to run from the start. Unless you live in Kansas City, you may want to avoid streaming content like Netflix while installing your tools.

You must have JDK 6 installed. Java Runtime Environment (JRE) alone will not do.

Your Operating System Requirements

  • Windows XP (32-bit), Visa (32 or 64-bit), Windows 7 (32 or 64-bit)
  • Mac OS X 10.5.8 or later (x86)
  • Linux (Ubuntu, Lucid Lynx)
  • GNU C Library (glibc) 2.7 or later
  • Ubuntu Linux 8.04 or later
  • 64-bit distributions capable of running 32-bit

Installing Eclipse

Installing the correct version of Eclipse is essential. (Android’s documentation assumes you already have the Eclipse IDE installed.) Eclipse Classic Helios (3.6.2 or higher) is required to run the Android Development Tools (ADT).

Development on an older machine will tax your patience, so if you’re using a machine with less than 2GB of RAM installed be prepared to wait a lot. There’s no official hardware recommendation for running Eclipse, but from what I can see many Android developers prefer to work on machines with 4GB.

Download & Install Android Software Development Kit

This doesn’t complete your development environment, but rather gives you access to the rest of the tools you’ll need.

Install Android Packages and Support Libraries

Using the SDK Manager, select at least one Android platform and the latest SDK-platform tools. Recommended packages will be pre-selected when you open the SDK Manager. Some packages are large, but don’t just sit around waiting for the installation to finish. Go get some sun and fresh air instead.

Install the Android Development Tools Plugin (ADT)

Plugins can be installed from the Help menu in Eclipse. To begin, go to Help > Install new software. You’ll first need to add a repository from which you’ll install the ADT. Once you’ve added the repository location, you’ll be able to install the plugin. Detailed installation instructions are available from the recommended links section below.

ADT Plugin Settings

Once you’ve got the ADT plugin installed and restarted Eclipse, you’ll need to update the plugin settings with the correct location of your Android SDK library. Don’t skip this step — the plugin needs to know where to find all of its important bits.

With your development environment installed, it’s time to work on your first app. Carefully follow the steps provided in the Android developer training resources to create and modify your first Hello World app. It takes just a few clicks. The tutorial walks you through the basic structure of an Android app through the editing of XML and Java files in the default app.

Setting Up and Running Virtual Devices

The Android tools for Eclipse includes a device emulator. You must set up virtual devices before using it to test your app. No defaults set up when you install the Android tools. You can reference device profiles provided at Verizon’s, Sprint’s, and AT&T’s developer resources sites. (Find them in the related links below.) These lists give you the exact specs you’ll need for all of the carriers’ currently available phones.

You can create as many virtual devices as you like. Just be sure to set up and start yours before running your first app in the emulator. The first time you boot it, the emulator may take five or 10 minutes to start up. Once it does, you can run your first app.

Now that you’ve got your development environment ready, what will you build after you’ve finished Hello World? Tell me, ask your questions or add your own tips in the comments below.

Related Links

Comments

  1. BY Tim K says:

    Very nice overview. I would add that debugging on an actual Android device is a lot more fun and a lot less waiting.

Post a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>