Upgrading the SDK

This document describes how to move your development environment and existing Android applications from an Android 1.0 SDK to the Android 1.1, Release 1 SDK. If you are migrating applications from an earlier SDK, please read the upgrading document available in the Android 1.0 SDK package.

To ensure that your applications are compliant with the Android 1.1 system available on mobile devices, you need to install the Android 1.1 SDK and port your existing Android applications to it. The sections below will guide you through the process.

Installing the Latest SDK

Download the SDK and unpack it into a safe location.

After unpacking the new SDK and saving it an appropriate location, you should:

  • Wipe your emulator data.

    Some data formats have changed since the last SDK release, so any previously saved data in your emulator must be removed. Open a console/terminal and navigate to the /tools directory of your new SDK. Launch the emulator with the -wipe-data option.

    Windows: emulator -wipe-data
    Mac/Linux: ./emulator -wipe-data

  • Update your PATH variable (Mac/Linux; optional).

    If you had previously setup your PATH variable to point to the SDK tools directory, then you'll need to update it to point to the new SDK. For example, for a .bashrc or .bash_profile file: export PATH=$PATH:<your_new_sdk_dir>/tools

  • If (and only if) you are developing using Ant, you will also need to modify your build.xml properties to point to the new SDK.

    Open the default.properties file associated with your build.xml file (typically located in the same directory). In the default.properties file, update the sdk-folder property with the full path to the new SDK directory.

Update your ADT Eclipse Plugin

If you develop on Eclipse and are migrating from an Android 1.0 SDK, no update of the ADT plugin is needed — skip to Update your Eclipse SDK Preferences.

If you are migrating from an earlier version of the SDK, you will need to update the ADT plugin.

You may also want to upgrade your ADT plugin when a new version becomes available for your existing version of the SDK.

The steps below describe how to update the ADT plugin to the latest version available.

Eclipse 3.3 (Europa)Eclipse 3.4 (Ganymede)
  1. Select Help > Software Updates > Find and Install....
  2. Select Search for updates of the currently installed features and click Finish.
  3. If any update for ADT is available, select and install.
  4. Restart Eclipse.

Alternatively,

  1. Select Help > Software Updates > Manage Configuration.
  2. Navigate down the tree and select Android Development Tools <version>
  3. Select Scan for Updates under Available Tasks.
  1. Select Help > Software Updates...
  2. Select the Installed Software tab.
  3. Click Update...
  4. If an update for ADT is available, select it and click Finish.
  5. Restart Eclipse.

Update your Eclipse SDK Preferences

The last step is to update your Eclipse preferences to point to the new SDK directory:

  1. Select Window > Preferences... to open the Preferences panel. (Mac OSX: Eclipse > Preferences)
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, click Browse... and locate the SDK directory.
  4. Click Apply, then OK.

Migrate Your Applications, if Necessary

If (and only if) you have written apps in an SDK released previous to the Android 1.0 SDK, you will need to migrate your applications. After installing the new SDK and updating the ADT Plugin (if applicable), you may encounter breakages in your application code, due to framework and API changes. You'll need to update your code to match the latest APIs.

One way to start is to open your project in Eclipse and see where the ADT identifies errors in your application. You can also look up specific changes in the Android APIs in the Android 1.1 Version Notes document.

If you have additional trouble updating your code, visit the Android Developers Group to seek help from other Android developers.

If you have modified one of the ApiDemos applications and would like to migrate it to the new SDK, note that you will need to uninstall the version of ApiDemos that comes preinstalled in the emulator. For more information, or if you encounter an "reinstallation" error when running or installing ApiDemos, see the troubleshooting topic I can't install ApiDemos apps in my IDE because of a signing error for information about how to solve the problem.

↑ Go to top