How-to work with the new Google Android SDK 1.5 "Cupcake"

Page content


Let’s spend some time talking a little about the Android SDKs and the available releases.

More than one year ago, the first SDK releases were out. Google allowed, with these release for developers to start working in its new and open system: Android. First releases of the SDK were buggy, very short in functionality (well, if we compare with an actual SDK) but this helped developers learn how Android was going to be used and introduced them to the Android architecture and terminology.

From time to time, new releases were out, however not yet the final version, just milestones that changed too much from one to other. It was such a change that sometimes complete classes were removed, names changed or methods and parameters re-named. This was really confusing until finally version 0.9 was release. The 0.9 versions was a lot more stable, and it was almost completely defined. Following it, in few short months, the final 1.0 version was out. At last! A full, complete and less-free bugs version! While we were working with this version, Google Android developers were thinking on future versions. The 1.1 version was out, and then the commonly known as “Cupcake”, or 1.5. This version had lots of new changes, in structure, in the User Experience, efficiency… Maybe some articles will be written talking about this very new SDK, lets start with the basic, and the things maybe interest us: How to change from last version we have (SDK 1.0 or 1.1) to the new one.

Installation and Configuration

First of all, we need to download the new version of the SDK, we can find it in the official Android Developers web page:

We choose the platform we are going to work on, and we download the file. After that we need to de-compress it and put in a folder.

In Eclipse, we need to uninstall the previous plugin used to work with Android in the IDE, if we have it. In the case you want to install it from the beginning, just look the Setting the Environment tutorial, in other case, you only have to re-install it.

Android Virtual Devices

One of the most initial significant changes to the environment and the interaction with the IDE, is the introduction of the AVD (Android Virtual Devices). After this SDK, to make it run an application in our emulator for the first time, we just need to use “Run as → Android Application”, then an Emulator instance will be opened and you can run the application there.

Now, first of all, we need to create, manually a “AVD”. Android Virtual Devices are configurations of emulator options that let you better model an actual device.

How to create a simple and default AVD:

You need to go the folder /tools inside the SDK directory. Here, you will find some new applications. First of all, we need to know the valid Android images we have in the SDK (platforms and addons). Using

android list targets (./android list targets if we are using GNU/Linux)

This will show the following list of available platforms.

Available Android targets:


Name: Android 1.1

Type: platform API

level: 2

Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P


Name: Android 1.5

Type: platform API

level: 3

Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P


Name: Google APIs

Type: add-on

Vendor: Google Inc.

Description: Android + Google APIs Based on Android 1.5 (API level 3)

Libraries: * (maps.jar) API for Google Maps

Skins: HVGA (default), HVGA-L, QVGA-P, HVGA-P, QVGA-L

Once we determine the image we are going to use, having a look to he information listed above, we choose a target and with the following line, we create the AVD

android create avd -n name_put_here -t 2

where the -t argument is the “id” of the target we are going to use. In this case I have put a “2”, this means that our AVD supports version 1.5. If we put a “1”, our device would be a “1.1 version device”.

After that, the system will ask you some question about customization of the device (hardware capabilities and so). The “no” option would let the device to “default” mode.

This AVD recently created, can be used in the IDE, when we want to run our application. Just as usually:

“Run as->Android Application” and then select the AVD (you can have more than one) to run the application on.

Want more about this new SDK?

In our next articles we will talk more about this very new Android SDK.

This post is part of the series: How-to develop Google Android applications: SDK 1.5 “Cupcake”

In this serie of articles, we will learn a bit more about the new Android SDK (1.5) alias “Cupcake”

  1. How-to work with the new Google Android SDK 1.5 “Cupcake”
  2. How-to work with the new Google Android SDK 1.5 - More Changes