Skip to content

Setting up an Android Virtual Device (AVD)

September 19, 2011

In my recent post on How to Set-up your System to Run Android I covered the basic steps to get your system (MAC) up and running with the Android SDK. Now that you have Java, Eclipse and all the necessary files from Google installed, you’re now ready to start programming. The only problem remaining is you need an emulator, or Virtual Device, that can simulate an Android phone.

The good news, you have this already installed as part of setting up your system to run Android. All you need to do is configure the AVD.

Steps to get the AVD up and running:

  1. Start Eclipse
  2. Under the menu “Window” select “Android SDK and AVD Manager”
  3. When the window opens you will see “Virtual Devices” in the left pane
  4. Click on the “New…” button
Android Virtual Device AVD

Window -> Android SDK and AVD Manger

Creating an Android Virtual Device: Settings

  1. In the “Name:” field, give the virtual device a name. I would recommend that you start with “Android” and then the target OS they you plan on using. If you are going to build for Android devices that are 2.1 and higher call it “Android-21”.
  2. For the “Target” pick one of the “Android x.x” APIs.
  3. For “SD Card” you can type in 512 Mib which is a safe and standard size.
  4. Under “Skin:” As a good practice you can go with HVGA as this is a standard 320 x 480 screen resolution for most android devices
AVD Screen

The Android Virtual Device Screen (AVD)

Notes:
What I like about the Android Virtual Device is you can create multiple virtual devices. This is why I recommend that you put the OS version in the name, such as “Android-15” (Version 1.5) or “Android-23” (Version 2.3). If you are going to be releasing your application out into the real world you’ll need to make sure it works on as MANY devices as possible otherwise you may get a bad review from an unhappy customer. I’ve have read that we, as programmers, should target Android devices all the way down to 1.5 and a lot of books out on the market say the same thing.

While I’m all for this, if you look at Google’s breakdown on Android OS market share, users are predominantly on 2.1 and up. This accounts for 97% of the market! Therefor I think that targeting versions 1.5 is a little drastic these days and it’s only going to get smaller and smaller as time goes on.

Now that you have a Virtual Device set up you can start programming and seeing what your application will look like. To run the AVD simply click on the green play button (for lack of better words) in the icon bar found in Eclipse.

Run AVDWhere to run the Android Virtual Device

Where to run the Android Virtual Device

What the Android Virtual Device Looks Like

Android Virtual Device

The Android Virtual Device

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: