diff options
Diffstat (limited to 'docs/html/sdk/1.6_r1')
-rw-r--r-- | docs/html/sdk/1.6_r1/index.jd | 140 | ||||
-rw-r--r-- | docs/html/sdk/1.6_r1/installing.jd | 441 | ||||
-rw-r--r-- | docs/html/sdk/1.6_r1/requirements.jd | 51 | ||||
-rw-r--r-- | docs/html/sdk/1.6_r1/upgrading.jd | 386 |
4 files changed, 1018 insertions, 0 deletions
diff --git a/docs/html/sdk/1.6_r1/index.jd b/docs/html/sdk/1.6_r1/index.jd new file mode 100644 index 0000000..11d369b --- /dev/null +++ b/docs/html/sdk/1.6_r1/index.jd @@ -0,0 +1,140 @@ +page.title=Android 1.6 SDK, Release 1 +sdk.redirect=0 +sdk.version=1.6 + +sdk.date=September 2009 + +sdk.win_download=android-sdk-windows-1.6_r1.zip +sdk.win_bytes= +sdk.win_checksum= + +sdk.mac_download=android-sdk-mac_x86-1.6_r1.zip +sdk.mac_bytes= +sdk.mac_checksum= + +sdk.linux_download=android-sdk-linux_x86-1.6_r1.tgz +sdk.linux_bytes= +sdk.linux_checksum= + +adt.zip_download=ADT-0.9.3.zip +adt.zip_version=0.9.3 +adt.zip_bytes= +adt.zip_checksum= + +@jd:body + +<p>For more information on this SDK release, read the +<a href="{@docRoot}sdk/RELEASENOTES.html#1.6_r1">Release Notes</a>.</p> + +<h2>SDK Contents</h2> + +<h4>Development tools</h4> + +<p>The SDK includes a full set of tools for developing and debugging application +code and designing an application UI. You can read about the tools in the <a +href="{@docRoot}guide/developing/tools/index.html">Dev Guide</a> and access them +in the <code><sdk>/tools/</code> directory. + +<p>The tools package in this SDK includes updates from those provided in the +previous SDK. The tools use the same project structure as in the previous SDK +(Android 1.5). If you have application projects developed in the Android 1.5 +SDK, you can migrate them to the latest SDK without modification. For more +information about how to migrate, see <a href="upgrading.html">Upgrading the +SDK</a>. + +<h4 id="system_images">Android Platforms</h4> + +<p>This SDK includes multiple Android platform versions that you can use to +develop applications. For each version, both a fully compliant Android library +and system image are provided. The table below lists the platform versions +included in this SDK. For more information about a platform version — +features, applications included, localizations, API changes, and so on — +see its Version Notes. </p> + +<table style="margin-right:1em;" width="80%"> +<tr> +<th><nobr>Platform</nobr></th><th><nobr>API +Level</nobr></th><th>Notes</th><th>Description</th> +</tr> +<tr> +<td width="5%"><nobr>Android 1.6</nobr></td> +<td width="5%">4</td> +<td width="5%"><nobr><a href="{@docRoot}sdk/android-1.6.html">Version +Notes</a></nobr></td> +<td>Includes a standard Android 1.6 library and system image with a set of +development applications. Does not include any external libraries (such as the +Maps external library).</td> +</tr> +<tr> +<td width="5%"><nobr>Android 1.5</nobr></td> +<td width="5%">3</td> +<td width="5%"><nobr><a href="{@docRoot}sdk/android-1.5.html">Version +Notes</a></nobr></td> +<td>Includes a standard Android 1.5 library and system image with a set of +development applications. Does not include any external libraries (such as the +Maps external library).</td> +</tr> +</table> + +<p>Note that you can use the Android SDK and AVD Manager to download other +platform versions into your development environment.</span>. + +<h4 id="system_images">SDK Add-Ons</h4> + +<p>An SDK add-on provides a development environment for an Android external +library or a customized (but fully compliant) Android system image. This SDK +includes the SDK add-ons listed below. The Android system API Level required by +the add-ons are noted.</p> + +<table style="margin-right:1em;" width="80%"> +<tr> +<th><nobr>Add-On</nobr></th><th><nobr>API Level</nobr></th> +<th>Notes</th><th>Description</th> +</tr> +<tr> +<td width="5%"><nobr>Google APIs</nobr></td> +<td width="5%">4</td> +<td width="5%"> </td> +<td>Includes the com.google.android.maps external library, a compliant +Android 1.6 system image, a {@link android.location.Geocoder Geocoder} +backend service implementation, documentation, and sample code. </td> +</tr> +<tr> +<td width="5%"><nobr>Google APIs</nobr></td> +<td width="5%">3</td> +<td width="5%"> </td> +<td>Includes the com.google.android.maps external library, a compliant +Android 1.5 system image, a {@link android.location.Geocoder Geocoder} +backend service implementation, documentation, and sample code. </td> +</tr> +</table> + +<h4>Sample Code and Applications</h4> + +<p>You can look at a variety of tutorials and samples in the <a +href="{@docRoot}guide/samples/index.html">Dev Guide</a> and access the sample +code itself in the <code><sdk>/platforms/<platform>/samples/</code> +directory of the SDK package. Note the new location — the SDK now includes +multiple platform versions that you can develop against and each has its own +sample code directory. </p> + +<p>For example, to view or build the samples available for the Android +1.6 platform (AVD target "Android 1.6"), you will find the samples in the +<code><sdk>/platforms/android-1.6/samples/</code> directory of the SDK +package. </p> + +<h4>Documentation</h4> + +<p>The SDK package includes a full set of local documentation. To view it, open +the <code><sdk>/documentation.html</code> file in a web browser. If you +are developing in an IDE such as Eclipse, you can also view the reference +documentation directly in the IDE. </p> + +<p>The most current documentation is always available on the Android Developers +site:</p> + +<p style="margin-left:2em;"><a +href="http://developer.android.com/index.html">http://developer.android.com/</a> +</p> + + diff --git a/docs/html/sdk/1.6_r1/installing.jd b/docs/html/sdk/1.6_r1/installing.jd new file mode 100644 index 0000000..954bfa3 --- /dev/null +++ b/docs/html/sdk/1.6_r1/installing.jd @@ -0,0 +1,441 @@ +page.title=Installing the Android 1.6 SDK +sdk.version=1.6 +sdk.preview=0 + +@jd:body + +<div id="qv-wrapper"> +<div id="qv"> + + <h2>In this document</h2> + <ol> + <li><a href="#Preparing">Prepare for Installation</a></li> + <li><a href="#Installing">Install the SDK</a></li> + <li><a href="#InstallingADT">Install the ADT Plugin for Eclipse</a></li> + <li><a href="#sdkContents">SDK Contents</a></li> + <li><a href="#NextSteps">Next Steps</a></li> + <li><a href="#InstallationNotes">Installation Notes</a></li> + <li><a href="#Troubleshooting">Troubleshooting ADT Installation</a></li> + </ol> + +</div> +</div> + +<p>This page describes how to install the Android SDK and set up your +development environment.</p> + +<p>If you encounter any problems during installation, see the +<a href="#InstallationNotes">Installation Notes</a> at the bottom of +this page.</p> + +<h4 style="margin-top">Upgrading?</h4> +<p>If you have already developed applications using an earlier version +of the Android SDK, please read <a href="upgrading.html">Upgrading the SDK</a>, instead. +</p> + + +<h2 id="Preparing">Prepare for Installation</h2> + +<p>Before you begin, take a moment to confirm that your development machine +meets the <a href="requirements.html">System Requirements</a>.</p> + +<p>If you will be developing on Eclipse with the Android Development +Tools (ADT) Plugin — the recommended path if you are new to +Android — make sure that you have a suitable version of Eclipse +installed on your computer (3.4 or newer is recommended). If you need +to install Eclipse, you can download it from this location: </p> + +<p style="margin-left:2em;"><a href= +"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p> + +<p>A Java or RCP version of Eclipse is recommended. </p> + +<h2 id="Installing">Install the SDK</h2> + +<p>After downloading the Android SDK, unpack the Android SDK .zip archive +to a suitable location on your machine. By default, the SDK files are unpacked +into a directory named <code>android_sdk_<em><platform</em>>_<em><release></em></code>. </p> + +<p>Make a note of the name and location of the unpacked SDK directory on your system — you +will need to refer to the SDK directory later, when setting up the Android plugin or when +using the SDK tools.</p> + +<p>Optionally, you may want to add the location of the SDK's primary <code>tools</code> directory +to your system <code>PATH</code>. The primary <code>tools/</code> directory is located at the root of the +SDK folder. Adding <code>tools</code> to your path lets you run Android Debug Bridge (adb) and +the other command line <a href="{@docRoot}guide/developing/tools/index.html">tools</a> without +needing to supply the full path to the tools directory. </p> +<ul> + <li>On Linux, edit your <code>~/.bash_profile</code> or <code>~/.bashrc</code> file. Look + for a line that sets the PATH environment variable and add the + full path to the <code>tools/</code> directory to it. If you don't + see a line setting the path, you can add one:</li> + + <ul><code>export PATH=${PATH}:<em><your_sdk_dir></em>/tools</code></ul> + + <li>On a Mac, look in your home directory for <code>.bash_profile</code> and + proceed as for Linux. You can create the <code>.bash_profile</code> if + you haven't already set one up on your machine. </li> + + <li>On Windows, right-click on My Computer, and select Properties. + Under the Advanced tab, hit the Environment Variables button, and in the + dialog that comes up, double-click on Path (under System Variables). Add the full path to the + <code>tools/</code> directory to the path. </li> + </ul> + +<p>Note that, if you update your SDK in the future, you +should remember to update your <code>PATH</code> settings to point to the new location, if different.</p> + +<p>If you will be using the Eclipse IDE as your development environment, +the next section describes how to install the Android Development Tools (ADT) plugin and set up Eclipse. +If you choose not to use Eclipse, you can +develop Android applications in an IDE of your choice and then compile, debug and deploy using +the tools included in the SDK (skip to <a href="#NextSteps">Next Steps</a>).</p> + + +<h2 id="InstallingADT">Install the ADT Plugin for Eclipse</h2> + +<p>Android offers a custom plugin for the Eclipse IDE, called Android +Development Tools (ADT), that is designed to give you a powerful, +integrated environment in which to build Android applications. It +extends the capabilites of Eclipse to let you quickly set up new Android +projects, create an application UI, add components based on the Android +Framework API, debug your applications using the Android SDK tools, and even export +signed (or unsigned) APKs in order to distribute your application.</p> + +<p>In general, using Eclipse with ADT is a highly recommended approach to +Android development and is the fastest way to get started. (If you prefer to +work in an IDE other than Eclipse, you do not need to install Eclipse or ADT, +instead, you can directly use the SDK tools to build and debug your +application—skip to <a href="#NextSteps">Next Steps</a>.)</p> + +<p>Once you have the Eclipse IDE installed, as described in <a +href="#Preparing">Preparing for Installation</a>, follow the steps below to +download the ADT plugin and install it in your respective Eclipse environment. +</p> + +<table style="font-size:100%"> +<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr> +<tr> +<td width="45%"> +<!-- 3.4 steps --> +<ol> + <li>Start Eclipse, then select <strong>Help</strong> > <strong>Software Updates...</strong>. + In the dialog that appears, click the <strong>Available Software</strong> tab. </li> + <li>Click <strong>Add Site...</strong> </li> + <li>In the Add Site dialog that appears, enter this URL in the "Location" field: + <pre style="margin-left:0">https://dl-ssl.google.com/android/eclipse/</pre> + <p>Note: If you have trouble aqcuiring the plugin, try using "http" in the Location URL, + instead of "https" (https is preferred for security reasons).</p> + <p>Click <strong>OK</strong>.</p></li> + <li>Back in the Available Software view, you should see the plugin listed by the URL, + with "Developer Tools" nested within it. Select the checkbox next to + Developer Tools and click <strong>Install...</strong></li> + <li>On the subsequent Install window, "Android DDMS" and "Android Development Tools" + should both be checked. Click <strong>Next</strong>. </li> + <li>Read and accept the license agreement, then click <strong>Finish</strong>.</li> + <li>Restart Eclipse. </li> +</ol> + +</td> +<td> +<!-- 3.5 steps --> +<ol> + <li>Start Eclipse, then select <strong>Help</strong> > <strong>Install + New Softare</strong>. </li> + <li>In the Available Software dialog, click <strong>Add...</strong>.</li> + <li>In the Add Site dialog that appears, enter a name for the remote site + (e.g., "Android Plugin") in the "Name" field. + <p>In the "Location" field, enter this URL:</p> + <pre>https://dl-ssl.google.com/android/eclipse/</pre> + <p>Note: If you have trouble aqcuiring the plugin, you can try + using "http" in the URL, instead of "https" (https is preferred for + security reasons).</p> + <p>Click <strong>OK</strong>.</p> + </li> + <li>Back in the Available Software view, you should now see "Developer + Tools" added to the list. Select the checkbox next to Developer Tools, + which will automatically select the nested tools Android DDMS and Android + Development Tools. + Click <strong>Next</strong>. </li> + <li>In the resulting Install Details dialog, the Android DDMS and Android + Development Tools features are listed. Click <strong>Next</strong> to + read and accept the license agreement and install any dependencies, + then click <strong>Finish</strong>. </li> + <li>Restart Eclipse. </li> + +</ol> +</td> +</tr> +</table> + +<p>Now modify your Eclipse preferences to point to the Android SDK directory:</p> +<ol> + <li>Select <strong>Window</strong> > <strong>Preferences...</strong> to open the Preferences + panel (Mac: <strong>Eclipse</strong> > <strong>Preferences</strong>).</li> + <li>Select <strong>Android</strong> from the left panel. </li> + <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and + locate your downloaded SDK directory. </li> + <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li> +</ol> + +<p>Done! If you haven't encountered any problems, then you're ready to +begin developing Android applications. See the +<a href="#NextSteps">Next Steps</a> section for suggestions on how to start. </p> + + +<h2 id="sdkContents">Contents of the SDK</h2> + +<p>Once you've downloaded and unpacked the SDK, open the SDK directory +and take a look at what's inside. + +<p>The table below describes the SDK directory contents. </p> + +<table> +<tr> +<th colspan="3">Name</th><th>Description</th> +</tr> +<tr> +<td colspan="3"><code>add-ons/</code></td> +<td>Contains add-ons to the Android SDK development +environment, which let you develop against external libraries that are available on some +devices. </td> +</tr> +<tr> +<td colspan="3"><code>docs/</code></td> +<td>A full set of documentation in HTML format, including the Developer's Guide, +API Reference, and other information.</td> +</tr> +<tr> +<td colspan="3"><code>platforms/</code></td> +<td>Contains a set of Android platform versions that you can develop +applications against, each in a separate directory. </td> +</tr> +<tr> +<td style="width:2em;border-bottom-color:white;"></td> +<td colspan="2"><code><platform>/</code></td> +<td>Platform version directory, for example "Android 1.6". All platform version +directories contain a similar set of files and subdirectory structure.</td> +</tr> + +<tr> +<td style="width:2em;border-bottom-color:white;"> </td> +<td style="width:2em;border-bottom-color:white;"></td> +<td><code>data/</code></td> +<td>Storage area for default fonts and resource definitions.</td> +</tr> +<tr> +<td style="width:2em;border-bottom-color:white;"></td> +<td style="width:2em;border-bottom-color:white;"></td> +<td><code>images/</code></td> +<td>Storage area for default disk images, including the Android system image, +the default userdata image, the default ramdisk image, and more. The images +are used in emulator sessions.</td> +</tr> +<tr> +<td style="width:2em;border-bottom-color:white;"></td> +<td style="width:2em;border-bottom-color:white;"></td> +<td><code>samples/</code></td> +<td>Contains a wide variety of sample applications that you can load as projects +into your development environment, compile, and run on the emulator.</td> +</tr> +<tr> +<td style="width:2em;border-bottom-color:white;"></td> +<td style="width:2em;border-bottom-color:white;"></td> +<td><code>skins/</code></td> +<td>A set of emulator skins available for the platform version. Each skin is +designed for a specific screen resolution.</td> +</tr> +<tr> +<td style="width:2em;border-bottom-color:white;"></td> +<td style="width:2em;border-bottom-color:white;"></td> +<td><code>templates/</code></td> +<td>Storage area for file templates used by the SDK development tools.</td> +</tr> +<tr> +<td style="width:2em;border-bottom-color:white;"></td> +<td style="width:2em;border-bottom-color:white;"></td> +<td><code>tools/</code></td> +<td>Any development tools that are specific to the platform version.</td> +</tr> +<tr> +<td style="width:2em;"></td> +<td style="width:2em;"></td> +<td><code>android.jar</code></td> +<td>The Android library used when compiling applications against this platform +version.</td> +</tr> +<tr> +<td colspan="3"><code>tools/</code></td> +<td>Contains the set of development and profiling tools available to you, such +as the emulator, the <code>android</code> tool, adb, ddms, and more.</td> +</tr> +<tr> +<td colspan="3"><code>RELEASE_NOTES.html</code></td> +<td>A file that loads the local version of the SDK release notes, if +available.</td> +</tr> +<tr> +<td colspan="3"><code>documentation.html</code></td> +<td>A file that loads the entry page for the local Android SDK +documentation.</td> +</tr> + +</table> + +<h2 id="NextSteps">Next Steps</h2> +<p>Once you have completed installation, you are ready to +begin developing applications. Here are a few ways you can get started: </p> + +<p><strong>Learn about Android</strong></p> +<ul> + <li>Take a look at the <a href="{@docRoot}guide/index.html">Dev + Guide</a> and the types of information it provides</li> + <li>Read an introduction to Android as a platform in <a + href="{@docRoot}guide/basics/what-is-android.html">What is + Android?</a></li> + <li>Learn about the Android framework and how applications run on it in + <a href="{@docRoot}guide/topics/fundamentals.html">Application + Fundamentals</a></li> + <li>Take a look at the Android framework API specification in the <a + href="{@docRoot}reference/packages.html">Reference</a> tab</li> +</ul> + +<p><strong>Explore the SDK</strong></p> +<ul> + <li>Get an overview of the <a + href="{@docRoot}guide/developing/tools/index.html">development + tools</a> that are available to you</li> + <li>Read how to develop <a + href="{@docRoot}guide/developing/eclipse-adt.html">in Eclipse/ADT</a> or + <a href="{@docRoot}guide/developing/other-ide.html">in other IDEs</a> + </li> +</ul> + +<p><strong>Explore some code</strong></p> +<ul> + <li>Set up a <a href="{@docRoot}guide/tutorials/hello-world.html">Hello + World application</a> (highly recommended, especially for Eclipse users)</li> + <li>Follow the <a href="{@docRoot}guide/tutorials/notepad/index.html"> + Notepad Tutorial</a> to build a full Android application </li> + <li>Create a new project for one of the other sample applications + included in <code><em><sdk></em>/platforms/<em><platform></em>/samples</code>, + then compile and run it in your development environment</li> +</ul> + +<p><strong>Visit the Android developer groups</strong></p> +<ul> + <li>Take a look at the <a + href="{@docRoot}community/index.html">Community</a> tab to see a list of + Android developers groups. In particular, you might want to look at the + <a href="http://groups.google.com/group/android-developers">Android + Developers</a> group to get a sense for what the Android developer + community is like.</li> +</ul> + + +<h2 id="InstallationNotes">Installation Notes</h2> + +<h3>Ubuntu Linux Notes</h3> + +<ul> + <li>If you need help installing and configuring Java on your + development machine, you might find these resources helpful: + <ul> + <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/Java </a></li> + <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/JavaInstallation</a></li> + </ul> + </li> + <li>Here are the steps to install Java and Eclipse, prior to installing + the Android SDK and ADT Plugin. + <ol> + <li>If you are running a 64-bit distribution on your development + machine, you need to install the <code>ia32-libs</code> package using + <code>apt-get:</code>: + <pre>apt-get install ia32-libs</pre> + </li> + <li>Next, install Java: <pre>apt-get install sun-java6-bin</pre></li> + <li>The Ubuntu package manager does not currently offer an Eclipse 3.3 + version for download, so we recommend that you download Eclipse from + eclipse.org (<a + href="http://www.eclipse.org/downloads/">http://www.eclipse.org/ + downloads/</a>). A Java or RCP version of Eclipse is recommended.</li> + <li>Follow the steps given in previous sections to install the SDK + and the ADT plugin. </li> + </ol> + </li> +</ul> + +<h3>Other Linux Notes</h3> + +<ul> + <li>If JDK is already installed on your development computer, please + take a moment to make sure that it meets the version requirements listed + in the <a href="requirements.html">System Requirements</a>. + In particular, note that some Linux distributions may include JDK 1.4 or Gnu + Compiler for Java, both of which are not supported for Android development.</li> +</ul> + + +<h2 id="Troubleshooting">Troubleshooting ADT Installation</h2> + +<p> If you are having trouble downloading the ADT plugin after following the +steps above, here are some suggestions: </p> + +<ul> + <li>If Eclipse can not find the remote update site containing the ADT plugin, +try changing the remote site URL to use http, rather than https. That is, set +the Location for the remote site to: +<pre>http://dl-ssl.google.com/android/eclipse/</pre></li> +<li>If you are behind a firewall (such as a corporate firewall), make sure that +you have properly configured your proxy settings in Eclipse. In Eclipse 3.3/3.4, +you can configure proxy information from the main Eclipse menu in +<strong>Window</strong> (on Mac, <strong>Eclipse</strong>) > +<strong>Preferences</strong> > <strong>General</strong> > <strong>Network +Connections</strong>.</li> +</ul> + +<p> If you are still unable to use Eclipse to download the ADT plugin as a +remote update site, you can download the ADT zip file to your local machine and +manually install it:</p> + +<ol> + <li><a href="http://developer.android.com/sdk/preview/index.html">Download the + ADT Plugin zip file</a> (do not unpack it).</li> + <li>Follow steps 1 and 2 in the <a href="#InstallingADT">default install + instructions</a> (above).</li> + <li>In the Add Site dialog, click <strong>Archive</strong>.</li> + <li>Browse and select the downloaded zip file.</li> + <li>In Eclipse 3.5 only, enter a name for the local update site (e.g., + "Android Plugin") in the "Name" field.</li> + <li>Click <strong>OK</strong>. + <li>Follow the remaining procedures as listed for + <a href="#InstallingADT">default installation</a> above, + starting from step 4.</li> +</ol> + +<p>To update your plugin once you've installed using the zip file, you will have +to follow these steps again instead of the default update instructions.</p> + +<h4>Other install errors</h4> + +<p>Note that there are features of ADT that require some optional +Eclipse components (for example, WST). If you encounter an error when +installing ADT, your Eclipse installion might not include these components. +For information about how to quickly add the necessary components to your +Eclipse installation, see the troubleshooting topic +<a href="{@docRoot}guide/appendix/faq/troubleshooting.html#installeclipsecomponents">ADT +Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p> + +<h4>For Linux users</h4> +<p>If you encounter this error when installing the ADT Plugin for Eclipse: +<pre> +An error occurred during provisioning. +Cannot connect to keystore. +JKS</pre> +<p> +...then your development machine lacks a suitable Java VM. Installing Sun +Java 6 will resolve this issue and you can then reinstall the ADT +Plugin.</p> + + diff --git a/docs/html/sdk/1.6_r1/requirements.jd b/docs/html/sdk/1.6_r1/requirements.jd new file mode 100644 index 0000000..781ee32 --- /dev/null +++ b/docs/html/sdk/1.6_r1/requirements.jd @@ -0,0 +1,51 @@ +page.title=System Requirements +sdk.version=1.6 +sdk.preview=0 +@jd:body + +<p>The sections below describe the system and software requirements for developing +Android applications using the Android SDK tools included in Android +<?cs var:sdk.version ?> SDK<?cs if:sdk.rel.id ?>, Release <?cs var:sdk.rel.id ?><?cs /if ?>. </p> + +<h3>Supported Operating Systems</h3> +<ul> + <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li> + <li>Mac OS X 10.4.8 or later (x86 only)</li> + <li>Linux (tested on Linux Ubuntu Dapper Drake)</li> +</ul> + +<h3>Supported Development Environments</h3> +<ul> + <li>Eclipse IDE + <ul> + <li><a href="http://www.eclipse.org/downloads/">Eclipse</a> 3.4 (Ganymede) or 3.5 (Galileo) + <ul> + <li>Note: Eclipse 3.3 has not been fully tested with ADT 0.9.3 and support can no longer be guaranteed. We suggest you upgrade to + Eclipse 3.4 or 3.5.</li> + <li>Recommended Eclipse IDE packages: Eclipse IDE for Java EE Developers, Eclipse IDE for Java Developers, Eclipse for RCP/Plug-in Developers</li> + <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included in most Eclipse IDE packages) </li> + <li>Eclipse Classic IDE package is not supported.</li> + </ul> + </li> + <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK 6</a> (JRE alone is not sufficient)</li> + <li><a href="installing.html#installingplugin">Android Development Tools plugin</a> (optional)</li> + <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li> + </ul> + </li> + <li>Other development environments or IDEs + <ul> + <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK 6</a> (JRE alone is not sufficient)</li> + <li><a href="http://ant.apache.org/">Apache Ant</a> 1.6.5 or later for Linux and Mac, 1.7 or later for Windows</li> + <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li> + </ul> + </li> +</ul> + +<p class="note"><strong>Note:</strong> If JDK is already installed on your development computer, please take a moment to make sure that it meets the version requirements listed above. In +particular, note that some Linux distributions may include JDK 1.4 or Gnu Compiler for Java, both of which are not supported for Android development. </p> + +<h3>Hardware requirements</h3> +<ul> + <li>For the base SDK package, at least 600MB of available disk space. For each platform downloaded into the SDK, an additional 100MB is needed. </li> +</ul> + diff --git a/docs/html/sdk/1.6_r1/upgrading.jd b/docs/html/sdk/1.6_r1/upgrading.jd new file mode 100644 index 0000000..2f9cc73 --- /dev/null +++ b/docs/html/sdk/1.6_r1/upgrading.jd @@ -0,0 +1,386 @@ +page.title=Upgrading the SDK +sdk.version=1.6 +sdk.preview=0 +@jd:body + + +<div id="qv-wrapper"> +<div id="qv"> + + <h2>Upgrading the SDK</h2> + <ul> + <li>If you are developing on the Android 1.5 SDK, migrating your +applications is straightforward and typically requires no modifications.</li> + <li>For Eclipse users, a new version of ADT is available. To use the Android +1.6 SDK, please upgrade to ADT 0.9.3 (or later).</li> + <li>For Windows users, the SDK includes a new USB driver that you can +install, if you are developing on a device. </li> + <li>A new Android SDK and AVD Manager tool is available. To access +it, run the <code>android</code> tool without options. </li> + </ul> + + <h2>In this document</h2> + <ol> + <li><a href="#Install">Install the SDK</a></li> + <li><a href="#UpdateAdt">Update Your Eclipse ADT Plugin</a></li> + <li><a href="#RunYourApps">Run Your Applications</a></li> + <li><a href="#MigrateYourApps">Migrate Your Applications</a></li> + </ol> + + <h2>Migrating information</h2> + <ol> + <li><a href="{@docRoot}sdk/api_diff/4/changes.html">Android 1.6 API +Differences</a></li> + </ol> + +</div> +</div> + +<p>This document describes how to move your development environment and existing +Android applications from an Android 1.5 SDK to the Android 1.6 SDK. If you are +migrating applications from an SDK older than 1.5, please also read the +upgrading document available in the Android 1.5 SDK package.</p> + +<p>There are several compelling reasons to upgrade, such as new SDK tools that +make developing more efficient and new APIs that allow you to expand the +feature-set of your applications. However, even if you or your applications +don't require these enhancements, it's important that you upgrade to ensure that +your applications run properly on the upcoming Android platform.</p> + +<p>The Android 1.6 platform will soon be deployable to devices around the world. +If you have already released Android applications to the public, you should test +the forward-compatibility of your applications on the latest version of the +platform as soon as possible. It's unlikely that you'll encounter problems in +your applications, but in the interest of maintaining the best user experience, +you should take no risks. So, please install the new Android SDK and test your +applications on the new platform.</p> + +<!-- NOT AVAILABLE FOR PREVIEW RELEASES --> +<p>For more information on new SDK features and system changes, +see the <a href="{@docRoot}sdk/android-1.6.html">Android 1.6 Version Notes</a>.</p> +<!-- --> + +<h2 id="Install">Install the SDK</h2> + +<p>If you haven't yet downloaded the SDK, <a href="index.html">download it from +here</a> and unpack it into a safe location.</p> + +<p>If you had previously setup your <code>PATH</code> variable to point to the SDK +tools directory, then you need to update it to point to the new SDK. For example, for +a <code>.bashrc</code> or <code>.bash_profile</code> file:</p> +<pre>export PATH=$PATH:<em><your_sdk_dir></em>/tools</pre> + + +<h2 id="UpdateAdt">Update Your Eclipse ADT Plugin</h2> + +<p>If you don't use the Eclipse IDE for development, +skip to <a href="#RunYourApps">Run Your Applications</a>.</p> + +<p>A new version of the ADT Plugin, ADT 0.9.3, is available in conjunction with +this SDK release. To use the SDK, you must upgrade your ADT Plugin to version +0.9.3. With ADT 0.9.3, you can still compile your existing applications against +multiple platform versions, such as Android 1.5, Android 1.1, and so on. However, +ADT 0.9.3 is not compatible with previous versions of the SDK and its tools, so +make sure that you upgrade both your SDK <em>and</em> the ADT Plugin.</p> + +The upgrade steps for ADT are described below. For information about new features in ADT, see the <a +href="{@docRoot}sdk/RELEASENOTES.html">Release Notes</a> document. </p> + +<p>If you're currently using a version of ADT <em>older</em> than version 0.9, +then you must uninstall ADT before you proceed (read how to <a +href="{@docRoot}sdk/1.5_r3/upgrading.html#uninstallAdt">Uninstall your previous +ADT plugin</a>). If you currently have version 0.9 or 0.9.1, then you don't need +to uninstall and can continue with the procedure below.</p> + +<table style="font-size:100%"> +<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr> +<tr> +<td width="50%"> +<!-- 3.4 steps --> +<ol> + <li>Select <strong>Help</strong> > <strong>Software Updates</strong>.</li> + <li>Select the <strong>Available Software</strong> tab.</li> + <li>Select the checkboxes next to Android DDMS and Android Developer Tools, + then click <strong>Update</strong>.</li> + <li>In the resulting Available Updates dialog, ensure that both Android DDMS + and Android Development Tools are selected, then click + <strong>Next</strong>.</li> + <li>Read and accept the license agreement and then click <strong>Finish</strong>. + This will download and install the latest version of Android DDMS and + Android Development Tools.</li> + <li>Restart Eclipse.</li> +</ol> +</td> +<td> +<!-- 3.5 steps --> +<ol> + <li>Select <strong>Help</strong> > <strong>Check for Updates</strong>. </li> + <li>In the resulting Available Updates dialog, locate the Android DDMS and + Android Development Tools features in the list and ensure that the checkboxes + next to them are selected. Click <strong>Next</strong>. + <p>If the Available Updates dialog does not list Android DDMS and Android + Development tools, make sure that you have set up a remote update site + for them, as described in + <a href="installing.html#InstallingADT">Installing the ADT Plugin</a>. + </p></li> + <li>In the Update Details dialog, click <strong>Next</strong>.</li> + <li>Read and accept the license agreement and then click <strong>Finish</strong>. + This will download and install the latest version of Android DDMS and + Android Development Tools.</li> + <li>Restart Eclipse.</li> +</ol> +</td> +</tr> +</table> + +<p>If you encounter problems with this update procedure, try performing a fresh +installation. Fully remove your existing ADT Plugin as described in <a +href="{@docRoot}sdk/1.5_r3/upgrading.html#uninstallAdt">Uninstall your previous +ADT plugin</a> and then follow the guide to <a +href="installing.html#InstallingADT">Installing the ADT Plugin for +Eclipse</a>.</p> + +<h3 id="updateEclipsePrefs">Update your Eclipse SDK Preferences</h3> + +<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: <strong>Eclipse</strong> > <strong>Preferences + </strong>).</li> + <li>Select <strong>Android</strong> from the left panel.</li> + <li>For the SDK Location, click <strong>Browse</strong> + and locate your SDK directory.</li> + <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li> +</ol> + + +<h2 id="RunYourApps">Run Your Applications to Test Forward Compatibility</h2> + +<p>Now that you have installed the Android 1.6 SDK, we encourage you run each of +your existing applications on the Android 1.6 system image that is included in +the SDK, to ensure that it functions properly on the new platform. +Testing forward-compatibility in this way is especially important for +applications that you may have already published and that may be installed on +devices that will upgrade to the new platform. </p> + +<p>In most cases, your applications will function properly when run on the new +version of the platform. However, it is possible that you will encounter +unexpected behavior, because of changes in the API or underlying platform. If +you do find problems, you can use the SDK tools to compile and publish an update +to the applications, which users can then download. + +<p>To test forward-compatibility, simply run your application, as-is, on an +instance of the Android Emulator that uses an AVD targeted to the "Android 1.6" +system image. Here are the steps: </p> + +<ol> + <li>Make no changes to your application code.</li> + <li>Create a new AVD that runs the new "Android 1.6" platform. </li> + <li>Launch your application in an emulator running the new AVD.</li> + <li>Perform normal testing on your application to ensure everything works as + expected.</li> +</ol> + +<p>Note that, for the purposes of forward-compatibility testing, you should not +change how your application is compiled. That is, you should continue to compile +the application against the same version of the Android library as before. The +only change needed is to the AVD, which controls the version of the Android +system image (run-time environment) on which the application is run. + +<p>For more information on creating an AVD and launching your application, see +<a href="{@docRoot}guide/developing/eclipse-adt.html#Running">Running Your +Applications (Eclipse)</a> or <a +href="{@docRoot}guide/developing/other-ide.html#Running">Running +Your Applications (other IDEs)</a>, depending on your development +environment.</p> + +<h3 id="FutureProofYourApps">Android 1.6 Forward-Compatibility Tips</h3> + +<p>The new version of the Android platform includes several new APIs, but +very few actual changes to existing APIs. This means that, in most +cases, your applications written with earlier versions of the Android library +should run properly on the Android 1.6 platform. </p> + +<p>However, here are some areas to pay attention to as you test forward-compatibility:</p> + +<ul> + <li><strong>Make sure your application doesn't use internal APIs</strong>. Your +application should not use any APIs that are not officially supported and are +not published in the Android reference documentation. Unofficial APIs can change +at any time without notice and — if your application happens to be using +them — such a change could cause the application to break.</li> + + <li><strong>Watch for assumptions about available hardware</strong>. Remember +that not all compatible devices offer the same hardware capabilities — +screens, keyboards, and physical keys, and so on. As you test your application, +watch for areas where your application depends on the presence of specific +hardware capabilities. If you find dependencies, you can design around them by +building in alternate support or graceful degradation, or you can specify them +as hardware requirements in a +<a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html"><code><uses-configuration></code>.</a> +element in the application's manifest file. Also see the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code><uses-feature></code> +manifest element, which lets your application declare a requirement for +specific features, such as an OpenGL ES version or a camera that has +autofocus capability. +</li> + + <li><strong>Watch for assumptions about available features</strong>. Not all +compatible devices offer equal support for embedded features. same hardware capabilities — +screens, keyboards, and physical keys, and so on. As you test your application, +watch for areas where your application depends on the presence of specific +hardware capabilities. If you find dependencies, you can design around them by +building in alternate support or graceful degradation, or you can specify them +as hardware requirements in a +<a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html"><code><uses-configuration></code>.</a> +element in the application's manifest file. </li> + + <p>When testing forward-compatibility, try running your application in various +AVDs that emulate different hardware configurations. For example, you can create +an AVD that does not offer a physical keyboard or one that uses a dpad instead +of a trackball. Running your application in different emulated hardware +configurations will give you an idea of where its dependencies are and help you +identify problems. </p> + </li> + + <li><strong>Watch for assumptions about screen resolution and +density</strong>. A device's screen resolution and density is likely to affect +the way that your application's UI is rendered, especially if your app specifies +dimensions or positions using pixels or absolute layouts. To ensure consistent +UI across screens, your app should specify the dimensions and positions of +layouts and drawables in relative units that can be scaled by the system as +appropriate, according to the density of the device's screen. Alternatively, you +can create custom sets of layout/drawable resources for specific screens, which +the system can then load as appropriate, based on the current device screen.</p> + + <p>When testing forward-compatibility, try running your application in various +AVDs that emulate different screen resolutions and densities. Also note that, +starting with Android 1.6, the platform provides a Compatibility Mode that +automatically scales the UI of applications if they do not explicitly indicate +support for the current screen in the +<a href="{@docRoot}guide/topics/manifest/supports-screen-element.html"><code><supports-screen></code> +element in their manifest files. As part of testing, you should evaluate how +your application is displayed in Compatibility Mode on different screens. </p> + </li> + + <li><strong>Avoid performing layout orientation changes based on the +acceletometer (or via other sensors)</strong>. Some Android-powered devices will +automatically rotate the orientation (and all devices have the option to turn on +auto-rotation), so if your application also attempts to rotate the orientation, +it can result in strange behavior. In addition, if your application uses the +accelerometer to detect shaking and you do not want to rotate the orientation, +then you should lock the current orientation with <a +href="{@docRoot}guide/topics/manifest/activity-element.html#screen">android:screenOrientation</a>. + </li> + +</ul> + +<h2 id="MigrateYourApps">Migrate Your Applications</h2> + +<p>If you want to use any of the new Android 1.6 APIs in your existing +applications, you must first migrate the applications to the new Android +platform version. Generally, migrating an application includes: </p> + +<ul> +<li>Referencing the proper API Level in the application's manifest file, +and</li> +<li>Resetting its project properties so that it is compiled against the Android +1.6 build target.</li> +</ul> + +<p>Additionally, to run your application in the emulator, you need to +create an AVD that uses the Android 1.6 system image. </p> + +<p class="note"><strong>Note:</strong> You only need migrate your application as +described in this section if the application will actually use APIs +<em>introduced</em> in the Android 1.6 platform (which are not available on +devices running older versions of the Android platform). If your application +does not use any new APIs, you can compile and run it without modification and +not migration is necessary.</p> + +<h3>Reference the Proper API Level</h3> + +<p>If your application is using APIs introduced in Android 1.6, you must +reference that dependency in the application's manifest file so that it can be +deployed to devices running the Android 1.6 platform. </p> + +<p>Open the manifest file and locate the <code>minSdkVersion</code> attribute +in the <code><uses-sdk></code> manifest element. Set the value of +<code>minSdkVersion</code> to <code>"4"</code> (the API Level +identifier corresponding to Android 1.6). Here's an example:</p> + +<pre> +<manifest> + ... + <uses-sdk android:minSdkVersion="4" /> + ... +</manifest> +</pre> + +<h3>Compile Against the Proper Build Target</h3> + +<p>Once you've changed the <code>minSdkVersion</code> value in your +application's manifest, you need to set the application's project properties so +that the application will be compiled against the Android 1.6 library. To do so, +follow the steps below for your respective development environment. </p> + +<h4 id="EclipseUsers">Eclipse Users</h4> + +<ol> + <li>Right-click on the individual project (in the Package Explorer) + and select <strong>Properties</strong>.</li> + <li>In the properties, open the Android panel and select a new Project Build Target. + Select "Android 1.6" to target the new platform (or "Google APIs" with the "4" + API Level, if your application uses the Google Maps APIs).</li> + <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li> +</ol> + +<h4 id="AntUsers">Ant Users</h4> + +<p>Use the <code>android</code> tool (located in +<code><em>your_sdk</em>/tools/</code>) to create a new <code>build.xml</code> +that references the new platform target. To see a list of available targets, +execute:</p> + +<pre>android list targets</pre> + +<p>Select the target <code>id</code> that corresponds to the "Android 1.6" platform +and pass it with the <code>--target</code> parameter when updating your project. +For example:</p> + +<pre>android update project --path /path/to/my-project --target 2</pre> + +<p>If your application uses the Google Maps APIs (i.e., MapView), be certain to +select a Google APIs target.</p> + +<h3>Create an AVD that Uses the Android 1.6 Platform</h3> + +<p>Finally, you need to set up a new AVD that uses the Android 1.6 platform, so that +you can run your application in the emulator. + +<p>To set up the new AVD, use the <code>android</code> tool, available in the +<code>tools/</code> directory of the SDK. You can run the AVD manager by simply +changing to the <code>tools/</code> directory and entering <code>android</code> +at the command line. Click "New" to create the AVD and set its properties.</p> + +<p>When creating the AVD, make sure to select a target of "Android 1.6 - API +Level 4". If your application uses the Google Maps APIs (MapView), select the +target "Google APIs (Google Inc.) - API Level 4". </p> + +<p>For more information about running your application in an AVD, see <a +href="{@docRoot}guide/developing/eclipse-adt.html#Running">Running Your +Application (Eclipse)</a> or <a +href="{@docRoot}guide/developing/other-ide.html#Running">Running Your +Application (other IDEs)</a>. </p> + +<p>For general information about AVDs, see the <a href="{@docRoot}guide/developing/tools/avd.html">Android Virtual +Devices</a> document. </p> + + + +<div class="special"> +<p>If you have trouble migrating to the new version of the SDK, visit the +<a href="http://groups.google.com/group/android-developers">Android Developers Group</a> +to seek help from other Android developers.</p> +</div> + |