Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be9d08d0 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 20228 into donut

* changes:
  add installing/upgrading docs for donut preview sdk and update eclipse ide doc to include new AVD Manager
parents ae18ca5c 75f7a264
Loading
Loading
Loading
Loading
+18 −32
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ folders and files in your new project:</p>

<h2 id="Running">Running Your Application</h2>

<p><em>Wait!</em> Before you can run your application on the Android Emulator, 
<p>Before you can run your application on the Android Emulator, 
you <strong>must</strong> create an Android Virtual Device (AVD). 
An AVD is a configuration that specifies the Android platform to be used on the emulator.
You can read more in the <a href="{@docRoot}guide/developing/tools/avd.html">Android Virtual
@@ -149,45 +149,31 @@ on running your applicaiton.</p>

<h3 id="CreatingAnAvd">Creating an AVD</h3>

<p>To avoid some explanation that's beyond the scope of this document, here's the 
basic procedure to create an AVD:</p>
<p>With ADT 0.9.2 and above, the Android AVD Manager provides a simple graphical interface
for creating and managing AVDs. (If you're using ADT version 0.9.1 or older, you must 
use the <code>android</code> tool to create your AVDs&mdash;read the AVD guide to
<a href="{@docRoot}guide/developing/tools/avd.html#creating">Creating an AVD</a>.)

<p>To create an AVD with the Android AVD Manager:</p>

<ol>
  <li>Open a command-line (e.g.,"Command Prompt" application on Windows, or "Terminal"
  on Mac/Linux) and navigate to your SDK package's 
  <code>tools/</code> directory.</li>
  <li>First, you need to select a Deployment Target. To view available targets, execute:
    <pre>android list targets</pre>
    <p>This will output a list of available Android targets, such as:</p>
<pre>
id:1
    Name: Android 1.1
    Type: platform
    API level: 2
    Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
id:2
    Name: Android 1.5
    Type: platform
    API level: 3
    Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
</pre>
    <p>Find the target that matches the Android platform upon which you'd like
    to run your application. Note the integer value of the <code>id</code> &mdash;
    you'll use this in the next step.</p>
  <li>Select <strong>Window > Android AVD Manager</strong>, or click the Android AVD Manager icon (a black device)
    in the Eclipse toolbar.</p>
  </li>
  <li>Create a new AVD using your selected Deployment Target. Execute:
    <pre>android create avd --name <em>&lt;your_avd_name&gt;</em> --target <em>&lt;targetID&gt;</em></pre>
  <li>Next, you'll be asked whether you'd like to create a custom hardware profile.
  If you respond "yes," you'll be presented with a series of prompts to define various aspects of the
  device hardware (leave entries blank to use default values, which are shown in brackets). Otherwise,
  press return to use all default values ("no" is the default).</li>
  <li>In the Virtual Devices panel, you'll see a list of existing AVDs. Click <strong>New</strong>
  to create a new AVD.</li>
  <li>Fill in the details for the AVD. 
    <p>Give it a name, a platform target, an SD card image (optional), and
    a skin (HVGA is default).</p>
  </li>
  <li>Click <strong>Create AVD</strong>.</li>
</ol>

<p>That's it; your AVD is ready. In the next section, you'll see how the AVD is used
<p>Your AVD is now ready and you can close the Android AVD Manager. 
In the next section, you'll see how the AVD is used
when launching your application on an emulator.</p>

<p>To learn more about creating and managing AVDs, please read the 
<p>For more information about AVDs, read the 
<a href="{@docRoot}guide/developing/tools/avd.html">Android Virtual Devices</a>
documentation.</p>

docs/html/sdk/preview/features.jd

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
sdk.redirect=true
sdk.redirect.path=android-1.5-highlights.html

@jd:body

+352 −0
Original line number Diff line number Diff line
page.title=Installing the Android SDK
sdk.version=1.6 Early Look
sdk.date=August 2009

@jd:body


<div id="qv-wrapper">
<div id="qv">

  <h2>In this document</h2>
  <ol>
    <li><a href="#Preparing">Preparing for Installation</a></li>
    <li><a href="#Installing">Installing the SDK</a></li>
    <li><a href="#InstallingADT">Installing the ADT Plugin for Eclipse</a>
      <ol>
        <li><a href="#Troubleshooting">Troubleshooting ADT Installation</a></li>
      </ol>
    </li>
    <li><a href="#NextSteps">Next Steps</a></li>
    <li><a href="#InstallationNotes">Installation Notes</a></li>
  </ol>

<!--  
  <h2>Migrating references</h2>
  <ol>
    <li><a href="{@docRoot}sdk/api_diff/donut/changes.html">Android 1.6 Early Look API Differences</a></li>
  </ol>
  -->

</div>
</div>

<p>This page describes how to install the Android Early Look SDK and set up your
development environment.</p>

<p>If you encounter any problems during installation, see the 
<a href="#installnotes">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">Preparing 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 &mdash; the recommended path if you are new to
Android &mdash; 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">Installing the SDK</h2>

<p>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>&lt;platform</em>&gt;_<em>&lt;release&gt;</em></code>. 
The directory contains a local copy of the documentation (accessible by opening
<code>documentation.html</code> in your browser) and the subdirectories 
<code>tools/</code>, <code>add-ons/</code>, <code>platforms/</code>, and others. Inside
each subdirectory of <code>platforms/</code> you'll find <code>samples/</code>, which includes
code samples that are specific to each version of the platform.</p>

<p>Make a note of the name and location of the unpacked SDK directory on your system &mdash; 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>&lt;your_sdk_dir&gt;</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="#next">Next Steps</a>).</p>


<h2 id="InstallingADT">Installing 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&mdash;skip to <a href="#NextSteps">Next Steps</a>.)</p>

<p>Once you have Eclipse installed, as described in <a href="#setup">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.3 (Europa)</th><th>Eclipse 3.4 (Ganymede)</th></tr>
<tr>
<td width="45%">
<!-- 3.3 steps -->
<ol>
    <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Software Updates</strong> 
&gt; <strong>Find and Install...</strong>. </li>
    <li>In the dialog that appears, select <strong>Search for new features to install</strong> 
and click <strong>Next</strong>. </li>
    <li>Click <strong>New Remote Site</strong>. </li>
    <li>In the resulting dialog box, enter a name for the remote site (e.g. "Android Plugin") and 
    enter the URL:
        <pre>https://dl-ssl.google.com/android/eclipse/</pre>
        <p>If you have trouble aqcuiring the plugin, try using "http" in the URL,
        instead of "https" (https is preferred for security reasons).</p>
        <p>Click <strong>OK</strong>.</p> </li>
    <li>You should now see the new site added to the search list (and checked).
        Click <strong>Finish</strong>. </li>
    <li>In the subsequent Search Results dialog box, select the checkbox for the
    "Android Plugin".
    This will select the nested tools: "Android DDMS" and "Android Development Tools". 
    Click <strong>Next</strong>.</li>
    <li>Read and accept the license agreement, then click <strong>Next</strong>. </li>
    <li>On the following Installation window, click <strong>Finish</strong>. </li>
    <li>The ADT plugin is not digitally signed. Accept the installation anyway
        by clicking <strong>Install All</strong>. </li>
    <li>Restart Eclipse. </li>
</ol>

</td>
<td>

<!-- 3.4 steps -->
<ol>
    <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Software Updates...</strong>.</li>
    <li>In the dialog that appears, click the <strong>Available Software</strong> tab. </li>
    <li>Click <strong>Add Site...</strong> </li>
    <li>Enter the Location:
      <pre>https://dl-ssl.google.com/android/eclipse/</pre>
        <p>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>
</tr>
</table>

<p>Now modify your Eclipse preferences to point to the Android SDK directory:</p>
<ol>
    <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
        panel (Mac: <strong>Eclipse</strong> &gt; <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="#next">Next Steps</a> section for suggestions on how to start. </p>


<h3 id="Troubleshooting">Troubleshooting ADT Installation</h3>
<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>) &gt; 
  <strong>Preferences</strong> &gt; <strong>General</strong> &gt; 
  <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 the 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 default install instructions (above).</li>
  <li>In Eclipse 3.3, click <strong>New Archive Site...</strong>. <br/>
      In Eclipse 3.4, click <strong>Add Site...</strong>, then <strong>Archive...</strong></li>
  <li>Browse and select the downloaded zip file.</li>
  <li>Follow the remaining procedures, above, starting from steps 5.</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>


<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>&lt;sdk&gt;</em>/platforms/<em>&lt;platfrom&gt;</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="{@docRoot}sdk/{@sdkCurrent}/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>


+43 −0
Original line number Diff line number Diff line
page.title=System Requirements
@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.3 (Europa), 3.4 (Ganymede), 3.5 (Galileo)
        <ul>
        <li><strong>Note:</strong> Eclipse 3.3 has not been fully tested with ADT 0.9.2 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>
 No newline at end of file
+257 −0

File added.

Preview size limit exceeded, changes collapsed.