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

Commit 0ac3183c authored by Bill Gruber's avatar Bill Gruber Committed by Android Git Automerger
Browse files

am f0d2c1c4: am 63ac0379: am d36bc32e: Merge "SDK doc updates" into honeycomb

* commit 'f0d2c1c4':
  SDK doc updates
parents 2e715df8 f0d2c1c4
Loading
Loading
Loading
Loading
+6 −10
Original line number Original line Diff line number Diff line
@@ -9,19 +9,15 @@ page.title=Introduction
  <p>However, you may choose to develop with another IDE or a simple text editor and invoke the
  <p>However, you may choose to develop with another IDE or a simple text editor and invoke the
  tools on the command line or with scripts. This is a less streamlined way to develop because you
  tools on the command line or with scripts. This is a less streamlined way to develop because you
  will sometimes have to call command line tools manually, but you will have access to the same
  will sometimes have to call command line tools manually, but you will have access to the same
  amount of features that you would have in Eclipse.</p>
  number of features that you would have in Eclipse.</p>

  <p class="note"><strong>Note:</strong> Before you begin developing Android applications, make
    sure you have gone through all of the steps outlined in <a
href="{@docRoot}sdk/installing.html">Installing the SDK</a>.</p>


  <p>The basic steps for developing applications with or without Eclipse are the same:</p>
  <p>The basic steps for developing applications with or without Eclipse are the same:</p>


  <ol>
  <ol>
    <li>Install Eclipse or your own IDE.

      <p>Install Eclipse along with <a href="{@docRoot}sdk/eclipse-adt.html#installing">the ADT
      Plugin</a>, or install an editor of your choice if you want to use the command line SDK tools.
      If you are already developing applications, be sure to <a href= 
      "{@docRoot}sdk/eclipse-adt.html#updating">update Your ADT Plugin</a> to the latest version
      before continuing.</p>
    </li>


    <li>Set up Android Virtual Devices or hardware devices.
    <li>Set up Android Virtual Devices or hardware devices.


+71 −71
Original line number Original line Diff line number Diff line
@@ -3,83 +3,83 @@ page.title=Tools


<img src="{@docRoot}assets/images/android_wrench.png" alt="" align="right">
<img src="{@docRoot}assets/images/android_wrench.png" alt="" align="right">


<p>The Android SDK includes a variety of custom tools that help you develop mobile
<p>The Android SDK includes a variety of tools that help you develop mobile
applications on the Android platform. The most important of these are the Android
applications for the Android platform. The tools are classified into two groups: SDK tools
Emulator and the Android Development Tools plugin for Eclipse, but the SDK also
and platform tools. SDK tools are platform independent and are required no matter which
includes a variety of other tools for debugging, packaging, and installing your
Android platform you are developing on. Platform tools are customized to support the features of the
applications on the emulator. </p>
latest Android platform.</p>

<h2 id="tools-sdk">SDK Tools</h2>
<p>The SDK tools are installed with the SDK starter package and are periodically updated.
The SDK tools are required if you are developing Android applications. The most important SDK tools
include the Android SDK and AVD Manager (<code>android</code>), the emulator
(<code>emulator</code>), and the Dalvik Debug Monitor Server
(<code>ddms</code>). A short summary of some frequently-used SDK tools is provided below.</p>


<dl>
<dl>
  <dt><a href="adb.html">Android Debug Bridge</a></dt>
    <dd>A versatile tool lets you manage the state of an emulator instance
    or Android-powered device.</dd>    

  <dt><a href="android.html">android</a></dt>
  <dt><a href="android.html">android</a></dt>
     <dd>Lets you manage AVDs, projects, and the installed components of the SDK.
    <dd>Lets you manage AVDs, projects, and the installed components of the SDK.</dd>
     </dd>
  <dt><a href="{@docRoot}guide/developing/debugging/ddms.html">Dalvik Debug Monitor

Server (ddms)</a></dt>
  <dt><a href="bmgr.html">bmgr</a></dt>
    <dd>Lets you debug Android applications.</dd>

    <dd>Lets you interact with the Backup Manager on Android devices
    supporting API Level 8 or greater. It provides commands to invoke backup and restore operations
    so that you don't need to repeatedly wipe data or take similar intrusive steps in order to test
    your application's backup agent. These commands are accessed via the adb shell.
    </dd>

  <dt><a href="dmtracedump.html">dmtracedump</a></dt>
  <dt><a href="dmtracedump.html">dmtracedump</a></dt>

    <dd>Generates graphical call-stack diagrams from trace log files. The tool uses the
    <dd>Generates graphical call-stack diagrams from trace log files.
Graphviz Dot utility to create the graphical output, so you need to install Graphviz before
    The tool uses the Graphviz Dot utility to create the graphical output, so you need to install
running <code>dmtracedump</code>. For more information on using <code>dmtracedump</code>, see <a
    Graphviz before running <code>dmtracedump</code>. For more information on using <code>dmtracedump</code>, see
href="{@docRoot}guide/developing/debugging/debugging-tracing.html#dmtracedump">Profiling
    <a href="{@docRoot}guide/developing/debugging/debugging-tracing.html#dmtracedump">Profiling with
with Traceview and dmtracedump</a></dd>
    Traceview and dmtracedump</a>
    </dd>

  <dt><a href="draw9patch.html">Draw 9-patch</a></dt>
  <dt><a href="draw9patch.html">Draw 9-patch</a></dt>
	    <dd>Allows you to easily create a {@link android.graphics.NinePatch} graphic using a WYSIWYG editor.
    <dd>Allows you to easily create a {@link android.graphics.NinePatch} graphic using a
	    It also previews stretched versions of the image, and highlights the area in which content is allowed.
WYSIWYG editor. It also previews stretched versions of the image, and highlights the area in which
	    </dd>
content is allowed.</dd>

  <dt><a href="emulator.html">Android Emulator (emulator)</a></dt>
  <dt><a href="emulator.html">Android Emulator</a></dt>
    <dd>A QEMU-based device-emulation tool that you can use to design, debug, and test
    <dd>A QEMU-based device-emulation tool that you can use to design,
your applications in an actual Android run-time environment.</dd>
    debug, and test your applications in an actual Android run-time environment. </dd>
  <dt><a href="hierarchy-viewer.html">Hierarchy Viewer (hierarchyviewer)</a></dt>

    <dd>Lets you debug and optimize an Android application's user interface.</dd>
  <dt><a href="hprof-conv.html">hprof-conv</a></dt>
  <dt><a href="hprof-conv.html">hprof-conv</a></dt>

    <dd>Converts the HPROF file that is generated by the Android SDK tools to a standard format so
    <dd>Converts the HPROF file that is generated by the Android SDK tools to a
you can view the file in a profiling tool of your choice.</dd>
    standard format so you can view the file in a profiling tool of your choice.</dd>

  <dt><a href="layoutopt.html">layoutopt</a></dt>
  <dt><a href="layoutopt.html">layoutopt</a></dt>
    <dd>Lets you quickly analyze your application's layouts in order to
    <dd>Lets you quickly analyze your application's layouts in order to optimize them for
    optimize them for efficiency.
efficiency.</dd>
    </dd>

  <dt><a href="mksdcard.html">logcat</a></dt>
      <dd>Lets you read system log messages that are output on an Android device or emulator.</dd>

  <dt><a href="mksdcard.html">mksdcard</a></dt>
  <dt><a href="mksdcard.html">mksdcard</a></dt>
      <dd>Helps you create a disk image that you can use with the emulator, 
    <dd>Helps you create a disk image that you can use with the emulator, to simulate the presence
      to simulate the presence of an external storage card (such as an SD card).</dd>
of an external storage card (such as an SD card).</dd>

  <dt><a href="monkey.html">Monkey</a></dt>
  <dt><a href="monkey.html">Monkey</a></dt>
      <dd>Runs on your emulator or device and generates pseudo-random
    <dd>Runs on your emulator or device and generates pseudo-random streams of user events such
      streams of user events such as clicks, touches, or gestures, as well as a number of system-level events.
as clicks, touches, or gestures, as well as a number of  system-level events. You can use the Monkey
      You can use the Monkey to stress-test applications that you are developing, in a random yet repeatable manner.</dd>
to stress-test applications that you are developing, in a random yet repeatable manner.</dd>

  <dt><a href="monkeyrunner_concepts.html">monkeyrunner</a></dt>
  <dt><a href="monkeyrunner_concepts.html">monkeyrunner</a></dt>
      <dd>Provides an API for writing programs that control an Android device
    <dd>Provides an API for writing programs that control an Android device or emulator from
      or emulator from outside of Android code.</dd>
outside of Android code.</dd>

  <dt><a href="proguard.html">ProGuard</a></dt>
  <dt><a href="proguard.html">ProGuard</a></dt>
      <dd>Shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes,
    <dd>Shrinks, optimizes, and obfuscates your code by removing unused code and renaming
      fields, and methods with semantically obscure names.</dd>
classes, fields, and methods with semantically obscure names.</dd>

  <dt><a href="sqlite3.html">sqlite3</a></dt>
  <dt><a href="sqlite3.html">sqlite3</a></dt>
    <dd>Lets you access the SQLite data files created and used by Android applications.</dd>
    <dd>Lets you access the SQLite data files created and used by Android applications.</dd>

  <dt><a href="traceview.html">traceview</a></dt>
    <dd>Provides a graphical viewer for execution logs saved by your application.</dd>
  <dt><a href="zipalign.html">zipalign</a></dt>
  <dt><a href="zipalign.html">zipalign</a></dt>
            <dd>Optimizes <code>.apk</code> files by ensuring that all uncompressed data starts
    <dd>Optimizes <code>.apk</code> files by ensuring that all uncompressed data starts with a
            with a particular alignment relative to the start of the file. This should always be used
particular alignment relative to the start of the file. This should always be used to align .apk
            to align .apk files after they have been signed.</dd>
files after they have been signed.</dd>
 </dl>
 </dl>


<h2 id="tools-platform">Platform Tools</h2>

<p>The platform tools are typically updated every time you install a new SDK platform. Each update
of the platform tools is backward compatible with older platforms. Usually, you directly use only
one of the platform tools&mdash;the <a href="adb.html">Android Debug Bridge (<code>adb</code>)</a>.
Android Debug Bridge is a versatile tool that lets you manage the state of an emulator instance or
Android-powered device. You can also use it to install an Android application (.apk) file on a
device.</p>

<p>The other platform tools, such as <a href="{@docRoot}guide/developing/tools/aidl.html">aidl</a>,
<code>aapt</code>, <code>dexdump</code>, and <code>dx</code>, are typically called by the Android
build tools or Android Development Tools (ADT), so you rarely need to invoke these tools directly.
As a general rule, you should rely on the build tools or the ADT plugin to call them as needed.</p>

<p class="note"><strong>Note:</strong> The Android SDK provides additional shell tools that can
be accessed through <code>adb</code>, such as <a href="bmgr.html">bmgr</a> and
<a href="logcat.html">logcat</a>.</p>
 No newline at end of file
+15 −9
Original line number Original line Diff line number Diff line
@@ -656,7 +656,7 @@ ADT installation as described in the steps below. </p>
<h3 id="downloading">Downloading the ADT Plugin</h3>
<h3 id="downloading">Downloading the ADT Plugin</h3>


<p>Use the Update Manager feature of your Eclipse installation to install the latest
<p>Use the Update Manager feature of your Eclipse installation to install the latest
revision of ADT on your development computer.<p>
revision of ADT on your development computer.<>


<p>Assuming that you have a compatible version of the Eclipse IDE installed, as
<p>Assuming that you have a compatible version of the Eclipse IDE installed, as
described in <a href="#preparing">Preparing for Installation</a>, above, follow
described in <a href="#preparing">Preparing for Installation</a>, above, follow
@@ -671,26 +671,32 @@ Software...</strong>.</li>
    <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
    <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
following URL for the <em>Location</em>:
following URL for the <em>Location</em>:
      <pre>https://dl-ssl.google.com/android/eclipse/</pre>
      <pre>https://dl-ssl.google.com/android/eclipse/</pre>
    </li>
    <li>Click <strong>OK</strong>
      <p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
      <p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
        instead of "https" (https is preferred for security reasons).</p>
instead of "https" (https is preferred for security reasons).</p></li>
      <p>Click <strong>OK</strong>.</p></li>
    <li>In the Available Software dialog, select the checkbox next to Developer Tools and click
    <li>In the Available Software dialog, select
<strong>Next</strong>.</li>
the checkbox next to Developer Tools and click <strong>Next</strong>.</li>
    <li>In the next window, you'll see a list of the tools to be downloaded. Click
    <li>In the next window, you'll see a list of the tools to be downloaded. Click
<strong>Next</strong>. </li>
<strong>Next</strong>. </li>
    <li>Read and accept the license agreements, then click <strong>Finish</strong>.</li>
    <li>Read and accept the license agreements, then click <strong>Finish</strong>.
      <p>Note: If you get a security warning saying that the authenticity or validity of
the software can't be established, click <strong>OK</strong>.</p></li>
    <li>When the installation completes, restart Eclipse. </li>
    <li>When the installation completes, restart Eclipse. </li>
</ol>
</ol>


<h3 id="configuring">Configuring the ADT Plugin</h3>
<h3 id="configuring">Configuring the ADT Plugin</h3>


<p>Once you've successfully downloaded ADT as described above, the next step
<p>After you've successfully downloaded the ADT as described above, the next step
is to modify your ADT preferences in Eclipse to point to the Android SDK directory:</p>
is to modify your ADT preferences in Eclipse to point to the Android SDK directory:</p>


<ol>
<ol>
    <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
    <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
        panel (Mac OS X: <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
        panel (Mac OS X: <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
    <li>Select <strong>Android</strong> from the left panel.</li>
    <li>Select <strong>Android</strong> from the left panel.</li>
      <p>You may see a dialog asking whether you want to send usage statistics to Google. If so,
make your choice and click <strong>Proceed</strong>. You cannot continue with this procedure until
you click <strong>Proceed</strong>.</p>
    <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and
    <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and
        locate your downloaded SDK directory. </li>
        locate your downloaded SDK directory. </li>
    <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
    <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
+63 −108

File changed.

Preview size limit exceeded, changes collapsed.