For the current SDK release, see the links under Current SDK Release in the side navigation.
This guide will help you migrate your development environment and applications to version 1.0, release 2, of the Android SDK. Use this guide if you've been developing applications on a different version of the Android SDK.
To ensure that your applications are compliant with the Android 1.0 system available on mobile devices, you need to install the new SDK and port your existing Android applications to the updated API. The sections below guide you through the process.
After unpacking the SDK, you should:
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 SDK. Launch the
emulator with the -wipe-data
option.
Windows: emulator -wipe-data
Mac/Linux: ./emulator -wipe-data
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. E.g., for a .bashrc
or .bash_profile
file:
export PATH=$PATH:<your_new_sdk_dir>/tools
If you develop on Eclipse and are using the ADT plugin, follow these steps to install the plugin that's required for this version of the SDK.
Eclipse 3.3 (Europa) | Eclipse 3.4 (Ganymede) |
---|---|
|
|
After restart, update your Eclipse preferences to point to the SDK directory:
All applications must now be signed before you can install them on the emulator. Both the ADT plugin and the Ant-based build tools support this requirement by signing compiled .apk files with a debug key. To do so, the build tools use the Keytool utility included in the JDK to to create a keystore and a key with a known alias and password. For more information, see "Signing and Publishing Your App" in the documentation included with the SDK.
To support signing, you should first make sure that Keytool is available to the SDK build tools. In most cases, you can tell the SDK build tools how to find Keytool by making sure that your JAVA_HOME environment variable is set and that it references a suitable JDK. Alternatively, you can add the JDK version of Keytool to your PATH variable.
If you are developing on a version of Linux that originally came with Gnu Compiler for Java, make sure that the system is using the JDK version of Keytool, rather than the gcj version. If keytool is already in your PATH, it might be pointing to a symlink at /usr/bin/keytool. In this case, check the symlink target to make sure that it points to the keytool in the JDK.
If you use Ant to build your .apk files (rather than ADT for Eclipse), you must regenerate your build.xml file. To do that, follow these steps:
- exec activitycreator --out <project folder> your.activity.YourActivity
Run in this way, activitycreator will not erase or create new Java files (or manifest files), provided the activity and package already exists. It is important that the package and the activity are real. The tool creates a new build.xml file, as well as a new directory called "libs" in which to place 3rd jar files, which are now automatically handled by the Ant script.
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 updating your SDK, you may encounter breakages in your code, due to framework and API changes. You'll need to update your code to match changes in the Android 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 Overview of Changes and API Diffs Report, both available in the documentation included with the Android 1.0 SDK package.
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.