page.title=Upgrading the SDK sdk.version=1.1_r1 @jd:body <!-- <div class="sidebox-wrapper"> <div class="sidebox-inner"> <h2>Useful Links</h2> <ul class="noindent"> <li><a href="migrating/0.9-1.0/changes-overview.html">Overview of Changes</a> <p>A high-level look at what's changed in Android, with discussion of how the changes may affect your apps.</p></li> <li><a href="migrating/0.9-1.0/changes.html">API Diff Report</a> <p>A detailed report that lists all the specific changes in the latest SDK.</p></li> <li><a href="RELEASENOTES.html">Release Notes</a> <p>Version details, known issues, and resolved issues. </p></li> <li><a href="http://groups.google.com/group/android-developers">Android Developers Group</a> <p>A forum where you can discuss migration issues and learn from other Android developers. </p></li> <li><a href="http://code.google.com/p/android/issues/list">Android Issue Tracker</a> <p>If you think you may have found a bug, use the issue tracker to report it.</p></li> </ul> </div> </div> --> <p>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. </p> <p>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.</p> <h2 id="install-new">Installing the Latest SDK</h2> <p><a href="{@docRoot}sdk/1.1_r1/index.html">Download the SDK</a> and unpack it into a safe location.</p> <p>After unpacking the new SDK and saving it an appropriate location, you should:</p> <ul> <li>Wipe your emulator data. <p>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 <code>/tools</code> directory of your new SDK. Launch the emulator with the <code>-wipe-data</code> option. <p>Windows: <code>emulator -wipe-data</code><br/> Mac/Linux: <code>./emulator -wipe-data</code></p> </li> <li>Update your PATH variable (Mac/Linux; optional). <p>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 <code>.bashrc</code> or <code>.bash_profile</code> file: <code>export PATH=$PATH:<em><your_new_sdk_dir></em>/tools</code></p> </li> <li>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. <p>Open the <code>default.properties</code> file associated with your build.xml file (typically located in the same directory). In the default.properties file, update the <code>sdk-folder</code> property with the full path to the new SDK directory.</p></li> </ul> <a name="Updating_the_ADT_plugin" id="Updating_the_ADT_plugin"></a> <h2 id="update-plugin">Update your ADT Eclipse Plugin</h2> <p>If you develop on Eclipse and are migrating from an Android 1.0 SDK, no update of the ADT plugin is needed — skip to <a href="#updateEclipsePrefs">Update your Eclipse SDK Preferences</a>. </p> <p>If you are migrating from an earlier version of the SDK, you will need to update the ADT plugin. <p>You may also want to upgrade your ADT plugin when a new version becomes available for your existing version of the SDK.</p> <p>The steps below describe how to update the ADT plugin to the latest version available. </p> <table style="font-size:100%"> <tr><th>Eclipse 3.3 (Europa)</th><th>Eclipse 3.4 (Ganymede)</th></tr> <tr> <td width="50%"> <ol> <li> Select <strong>Help</strong> > <strong>Software Updates</strong> > <strong>Find and Install...</strong>. </li> <li> Select <strong>Search for updates of the currently installed features</strong> and click <strong>Finish</strong>. </li> <li> If any update for ADT is available, select and install. </li> <li> Restart Eclipse.</li> </ol> <p> Alternatively, </p> <ol> <li> Select <strong>Help</strong> > <strong>Software Updates</strong> > <strong>Manage Configuration</strong>. </li> <li> Navigate down the tree and select <strong>Android Development Tools <version></strong> </li> <li> Select <strong>Scan for Updates</strong> under <strong>Available Tasks</strong>.</li> </ol> </td> <td> <ol> <li>Select <strong>Help</strong> > <strong>Software Updates...</strong></li> <li>Select the <strong>Installed Software</strong> tab.</li> <li>Click <strong>Update...</strong></li> <li>If an update for ADT is available, select it and click <strong>Finish</strong>.</li> <li>Restart Eclipse.</li> </ol> </td> </tr> </table> <h2 id="updateEclipsePrefs">Update your Eclipse SDK Preferences</h2> <p>The last step is to update your Eclipse preferences to point to the new SDK directory:</p> <ol> <li>Select <strong>Window</strong> > <strong>Preferences...</strong> to open the Preferences panel. (Mac OSX: <strong>Eclipse</strong> > <strong>Preferences</strong>)</li> <li>Select <strong>Android</strong> from the left panel.</li> <li>For the SDK Location in the main panel, click <strong>Browse...</strong> and locate the SDK directory.</li> <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li> </ol> <h2 id="migrate">Migrate Your Applications, if Necessary</h2> <p>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.</p> <p>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 <a href="{@docRoot}sdk/android-1.1.html#api-changes">Android 1.1 Version Notes</a> document.</p> <p>If you have additional trouble updating your code, visit the <a href="http://groups.google.com/group/android-developers">Android Developers Group</a> to seek help from other Android developers.</p> <p>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 <a href="{@docRoot}guide/appendix/faq/troubleshooting.html#apidemosreinstall">I can't install ApiDemos apps in my IDE because of a signing error</a> for information about how to solve the problem.</p>