How-to work with the new Google Android SDK 1.5 - More Changes

Page content


New Android releases are coming out, now, in the beginning its a good time to start thinking about compatibility between this releases. How do we know if our application will run in a 1.1 device, if we work with 1.5 SDK? With the new compatibility system, we can indicate the minimum version of the Android system required to run the application.

This new SDK version has been identified like the “Level 3 API”, we consider the 1.0 → Level 1, and the 1.1 → Level 2. With this nomenclature, we always know which API we are talking about.

How can we point an application as a API level compatible? You have to add a android:minSdKVersion attribute to the manifest file of your App.

This way, you are telling the application that its compatible only with the latest version, the 1.5.

We have to be very careful with the AVD we create to test the application, remember that we can create an Emulator with the SDK we want. Have a look to the first article of the series.

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

Project changes

If we create a new 1.5 SDK project or if we migrate an older project to the new SDK, you will notice some changes in the architecture.

One of the changes is related to the location of the file. If you remember this is the resource file, the bridge between the Android code and the resources (images, layouts, music…). In older SDKs this file was in the same folder as the main activity. Now, its in a separate folder called “gen” where all generated (and no modifiable) Java files is stored. Now, there is only the file, but…who knows if in the future this changes and new stuff will be placed here.

We can see that a new file has appeared, in the project folder: If we open it, we can see a text file. This file is used in Version systems to check system compatibility and also to configure different properties in the build system (If we are using Ant, for example).

Want more?

We will delve deeper in this new SDK in further articles!

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