xtensivearts - One Leap Ahead
Android SDK 1.6 (a.k.a Donut): How to Update

Android SDK 1.6 (a.k.a Donut): How to Update

Posted 09/20/2009 - 2:16 am by Mathias Reisch

If you are new to Android development and you want to install all necessary software to get started, you can of course follow episode #1 in our tutorial series. Watching that video should get you up and running in no time. But what if you already have an Android development environment with an old SDK version? How do you actually update your installation to the latest version? Well, look no further, we have the answers you need.

Step 1: Download the New SDK Version

You can get the latest version of the Android SDK at developer.android.com. Click on the corresponding link, read and accept the license agreement and hit the Download button. Save the archive file to you computer.

Hint
Keeping your Android SDK versions in a designated folder makes updating faster and less confusing. For example: You might want to create a folder called C:\Android SDK and save all Android version to that folder. It is also useful to keep at least one previous version of the Android SDK in that folder. That way you can go back to a working configuration in case something does not work as expected.

When the download has finished, extract the archive file to where you want your Android SDK to be installed (e.g. C:\Android SDK). Now we need to tell Windows where it can find the new Android SDK version.

Step 2: Update the PATH Variable

Since the new SDK version has a different folder name, we need to update the PATH variable so that it points to the /tools directory of the new SDK version. On Windows Vista the steps to accomplish this are as follows:

  1. Open Control Panel
  2. Click on System icon
  3. Click Advanced System Properties
  4. Click the Advanced tab
  5. Click Environment Variables button
  6. Finally, in the environment variables window, hightlight the PATH variable and click on Edit. You will see a textfield with a long string made of concatenated paths. Scroll through the string until you find something like C:\[some-path]\android-sdk-windows-1.5_r3\tools. Depending on which was the last SDK version you installed, the numbers at the end may be different for you. Change that part of the PATH string (and ONLY that part) to match the folder of your new android SDK version, e.g. C:\[some-path]\android-sdk-windows-1.6_r1\tools.
  7. When you are done, click Ok.

Step 3: Update the ADT

The new Android SDK 1.6 needs an updated version of the Android Development Tools (ADT) in order to operate properly. Updating is very easy, here are the steps.

  1. Start eclipse.
  2. Go to Help -> Check for Updates.
  3. A new windows shows up, where you can see all available updates. There should be at least two: The Android DDMS and the Android Development Tools 0.9.3. Make sure both checkboxes are selected and click Next.
  4. On the next screen simply click Next.
  5. Read and accept the license agreement and click Finish.
  6. Eclipse will now update your installation. When it has finished, it will ask you to restart eclipse, so that the changes can take effect. After the restart the new ADT Plugin should be installed.

Step 4: Update the Preferences

Finally you need to tell eclipse where it can find the new SDK. Assuming that you are still in eclipse, follow these steps:

  1. Go to Window -> Preferences.
  2. In the list on the left side select Android.
  3. Now you should see the Android preferences on the right. Click on Browse and select the folder of the new Android SDK, e.g. C:\Android SDK\android-sdk-windows-1.6_r1. Click Ok.
  4. When you click Apply, you should see Android 1.6 in the Target Name column of the list above. If you don’t see it, simply click Ok and then re-open the Preferences dialog. Make sure the entry for Android 1.6 is now in the list.

Step 5: Create a New AVD

If you want to use the new Android emulator and the new API level in your applications, you have to create a new AVD (Android Virtual Device).

  1. Go to Window -> Android SDK and AVD Manager.
  2. Click on New.
  3. Choose a name for you new AVD, e.g. myAndroid16r1.
  4. For the target choose Android 1.6 - API Level 4.
  5. Click Create AVD.
  6. Close the AVD Manager.

Now, when you create a new Android project, choose Android 1.6 as a build target. When you launch your application eclipse will automatically choose the proper AVD.

Final Words

Of course you can take this article as a guide for future updates. Whether you need to update the ADT or not, depends on the actual release, so you should always have a look at the release notes for the latest SDK version, before updating your installation and configuration.

Related posts:
  1. How to Update Your Development Environment to Android SDK 2.0
  2. How to Solve Update Errors
  3. New Android SDK: The Donut Has Arrived!
  4. Episode #2 – Create A New Project And Run It
  5. Android 2.0 SDK: Wanna Have an Eclair?
  6. Episode #1 – Getting Started!

Why Not Leave a Comment?

Name:*
E-Mail:*
Website:
Comment:*

Comments