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

Commit 47950314 authored by Scott Main's avatar Scott Main Committed by smain@google.com
Browse files

reorg the SDK setup docs to streamline setup for all variations.

Move ADT plugin to the ADT help doc and combine the three setup guides
into one page that is dynamic based on a URL parameter.

Change-Id: If8a8855bdb8e8ec9b0eefedd35ae24ea60497741
parent 4a9f1298
Loading
Loading
Loading
Loading
+0 −157
Original line number Diff line number Diff line
@@ -5,163 +5,6 @@ walkthru=1
@jd:body


<p>The Android SDK is composed of modular packages that you can download separately using
the Android SDK Manager. For example, when the SDK Tools are updated or a new version of
the Android platform is released, you can use the SDK Manager to quickly download them to
your environment. Simply follow the procedures described in <a
href="{@docRoot}sdk/installing/adding-packages.html">Adding Platforms and Packages</a>.</p>

<p>There are several different packages available for the Android SDK. The table below describes
most of the available packages and where they're located once you download them.</p>


<h2 id="Packages">Available Packages</h2>


<table>
  <tr><th>Package</th><th>Description</th><th>File Location</th></tr>
  <tr>
    <td><a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools</a></td>
    <td>Contains tools for debugging and testing, plus other
utilities that are required to develop an app. If you've just installed the SDK starter package,
then you already have the latest version of this package. Make sure you keep this up to date.</td>
    <td>{@code &lt;sdk>/tools/}</td></tr>
  <tr><td>SDK Platform-tools</td>
    <td>Contains platform-dependent tools for developing and debugging
your application. These tools support the latest features of the Android platform and are typically
updated only when a new platform becomes available. These tools are always backward compatible with
older platforms, but you must be sure that you have the latest version of these tools when you
install a new SDK platform.</td>
    <td>{@code &lt;sdk>/platform-tools/}</td>
  </tr>
  
  <tr>
    <td>Documentation</td>
    <td>An offline copy of the latest documentation for the Android
platform APIs.</td>
    <td>{@code &lt;sdk>/docs/}</td>
  </tr>
  <tr><td>SDK Platform</td>
    <td>There's one SDK Platform available for each version of Android. It includes an {@code
android.jar} file with a fully compliant Android library. In order to build an Android app, you must
specify an SDK platform as your build target.</td>
    <td>{@code &lt;sdk>/platforms/&lt;android-version>/}</td>
  </tr>
  <tr>
    <td>System Images</td>
    <td>Each platform version offers one or more different system images (such as for ARM
and x86). The Android emulator requires a system image to operate. You should always test your
app on the latest version of Android and using the emulator with the latest system image is a
good way to do so.</td>
    <td>{@code &lt;sdk>/platforms/&lt;android-version>/}</td>
  </tr>
  <tr>
    <td>Sources for Android SDK</td>
    <td>A copy of the Android platform source code that's useful for
stepping through the code while debugging your app.</td>
    <td>{@code &lt;sdk>/sources/}</td>
  </tr>
  <tr>
    <td><a href="{@docRoot}tools/samples/index.html">Samples for SDK</a></td>
    <td>A collection of sample apps that demonstrate a variety of the
platform APIs. These are a great resource to browse Android app code. The API Demos app in
particular provides a huge number of small demos you should explore.</td>
    <td>{@code &lt;sdk>/platforms/&lt;android-version>/samples/}</td>
  </tr>
  <tr>
    <td><a href="http://developers.google.com/android">Google APIs</a></td>
    <td>An SDK add-on that provides both a platform you can use to develop an app
using special Google APIs and a system image for the emulator so you can test your app using the
Google APIs.</td>
    <td>{@code &lt;sdk>/add-ons/}</td>
  </tr>
  
  <tr>
    <td><a href="{@docRoot}tools/support-library/index.html">Android Support</a></td>
    <td>A static library you can include in your app sources in order to use powerful
APIs that aren't available in the standard platform. For example, the support library
contains versions of the {@link android.support.v4.app.Fragment} class that's compatible with
Android 1.6 and higher (the class was originally introduced in Android 3.0) and the {@link
android.support.v4.view.ViewPager} APIs that allow you to easily build a side-swipeable UI.</td>
    <td>{@code &lt;sdk>/extras/android/support/}</td>
  </tr>
  <tr>
    <td><a href="{@docRoot}google/play/billing/index.html">Google Play Billing</a></td>
    <td>Provides the static libraries and samples that allow you to
integrate billing services in your app with Google Play.</td>
    <td>{@code &lt;sdk>/extras/google/}</td>
  </tr>
  <tr>
    <td><a href="{@docRoot}google/play/licensing/index.html">Google Play Licensing</a></td>
    <td>Provides the static libraries and samples that allow you to perform license verification for
your app when distributing with Google Play.</td>
    <td>{@code &lt;sdk>/extras/google/}</td>
  </tr>
</table>

<p>The above table is not comprehensive and you can <a
href="#AddingSites">add new sites</a> to download additional packages from third-parties.</p>

<p>In some cases, an SDK package may require a specific minimum revision of
another package or SDK tool. For example, there may be a dependency between the ADT Plugin for
Eclipse and
the SDK Tools package. When you install the SDK Tools
package, you should also upgrade to the required version of ADT (if you
are developing in Eclipse). In this case,  the major version number for your ADT plugin should
always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).
</p>

<p>The development tools will notify you with debug warnings if there is dependency that you need to
address. The Android SDK Manager also enforces dependencies by requiring that you download any
packages that are needed by those you have selected.</p>





<h2 id="AddingSites">Adding New Sites</h2>

<p>By default, <strong>Available Packages</strong> displays packages available from the
<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
their own Android SDK add-ons, then download the SDK add-ons
from those sites.</p>

<p>For example, a mobile carrier or device manufacturer might offer additional
API libraries that are supported by their own Android-powered devices. In order
to develop using their libraries, you must install their Android SDK add-on, if it's not already
available under <em>Third party Add-ons</em>. </p>

<p>If a carrier or device manufacturer has hosted an SDK add-on repository file
on their web site, follow these steps to add their site to the Android SDK
Manager:</p>

<ol>
  <li>Select <strong>Available Packages</strong> in the left panel.</li>
  <li>Click <strong>Add Add-on Site</strong> and enter the URL of the
<code>repository.xml</code> file. Click <strong>OK</strong>.</li>
</ol>
<p>Any SDK packages available from the site will now be listed under a new item named
<strong>User Add-ons</strong>.</p>




<h2 id="troubleshooting">Troubleshooting</h2>

<p><strong>Problems connecting to the SDK repository</strong></p>

<p>If you are using the Android SDK Manager to download packages and are encountering
connection problems, try connecting over http, rather than https. To switch the
protocol used by the Android SDK Manager, follow these steps: </p>

<ol>
  <li>With the Android SDK Manager window open, select "Settings" in the
  left pane. </li>
  <li>On the right, in the "Misc" section, check the checkbox labeled "Force
  https://... sources to be fetched using http://..." </li>
  <li>Click <strong>Save &amp; Apply</strong>.</li>
</ol>



+4 −6
Original line number Diff line number Diff line
@@ -206,12 +206,10 @@ This is the Android Software Development Kit License Agreement


<div id="next-steps" style="display:none;position:absolute;width:inherit">
  <p>Now that you've downloaded the Android SDK, you don't need to return here
  for SDK updates. The SDK tools allow you to
  install additional packages and future updates from the SDK Manager.</p>
  <p>For instructions about setting up your Android SDK for the first time,
  read <a id="next-link" href="{@docRoot}sdk/installing/bundle.html">Setting
  Up the ADT Bundle</a>.</p>
  <p>You're just a few steps away from building apps for Android!</p>
  <p>In a moment, you'll be redirected to <a
  id="next-link" href="{@docRoot}sdk/installing/index.html">Installing the
  Android SDK</a>.</p>

</div><!-- end next-steps -->

+204 −45
Original line number Diff line number Diff line
page.title=Adding Platforms and Packages
page.title=Adding SDK Packages

@jd:body

<style>
ol.large {
  margin-left:0;
}
ol.large > li {
  list-style-position: inside;
  list-style-type:none;
  margin:30px 0 0 0;
  padding:30px 20px;
  background:#eee;
}
ol.large > li:nth-child(odd) {
} 
ol.large > li:before {
  display:inline;
  left:-40px;
  float:left;
  width:20px;
  font-size:20px;
  line-height:20px;
}
ol.large > li > h2 {
  font-size:20px;
  line-height:20px;
  padding:0 0 0 20px;
  margin:0 0 20px 0;
  display:inline-block;
  font-weight:normal;
}
ol.large > li:nth-child(1):before {
  content:"1. ";
}
ol.large > li:nth-child(2):before {
  content:"2. ";
}
ol.large > li:nth-child(3):before {
  content:"3. ";
}
ol.large > li:nth-child(4):before {
  content:"4. ";
}
ol.large > li:nth-child(5):before {
  content:"5. ";
}
ol.large > li:nth-child(6):before {
  content:"6. ";
}
</style>

<p>The Android SDK separates tools, platforms, and other components into packages you can
  download using the Android SDK Manager. The original
SDK package you've downloaded includes only the SDK Tools. To develop an Android app,
you also need to download at least one Android platform and the latest SDK Platform-tools.</p>

<ol>
<li>Launch the SDK Manager.
<p>If you've used the Windows installer to install the SDK tools, you should already have the
Android SDK Manager open. Otherwise, you can launch the Android SDK Manager in one of the following
ways:</p>
<p>
By default, the Android SDK does not include everything you need to start developing.
The SDK separates tools, platforms, and other components into packages you can
download as needed using the
<a href="{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>.
So before you can start, there are a few packages you should add to your Android SDK.</p>

<p>To start adding packages, launch the Android SDK Manager in one of the following ways:</p>
<ul>
  <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
  <li>In Eclipse or Android Studio, click <strong>SDK Manager</strong>
<img src="{@docRoot}images/tools/sdk-manager-studio.png"
style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li>
  <li>If you're not using Eclipse or Android Studio:
    <ul>
      <li>Windows: Double-click the <code>SDK Manager.exe</code> file at the root of the Android
  SDK directory.</li>
  <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
      <li>Mac/Linux: Open a terminal and navigate to the <code>tools/</code> directory in the
  Android SDK, then execute <code>android sdk</code>.</li>
    </ul>
  </li>
</ul>

<li>The SDK Manager shows all the SDK packages available for you to add to your Android SDK.
As a minimum configuration for your SDK, we recommend you install the following:
<ol class="large">
<li>
  <h2 class="norule">Get the latest SDK tools</h2>

<img src="/images/sdk_manager_packages.png" alt="" width="350" style="float:right;margin-left:20px" />

  <p>As a minimum when setting up the Android SDK,
  you should download the latest tools and Android platform:</p>
  <ol>
   <li>Open the Tools directory and select:
     <ul>
 <li>The latest Tools packages (check the <strong>Tools</strong> folder).</li>
 <li>The latest version of Android (check the first <strong>Android</strong> folder).</li>
 <li>The Android Support Library (open the <strong>Extras</strong> folder and check
  <strong>Android Support Library</strong>).</li>
       <li><strong>Android SDK Tools</strong></li>
       <li><strong>Android SDK Platform-tools</strong></li>
       <li><strong>Android SDK Build-tools</strong></li>
     </ul>
   </li>
   <li>Open the first Android X.X folder (the latest version) and select:
     <ul>
      <li><strong>SDK Platform</strong></li>
      <li>A system image for the emulator, such as <br>
      <strong>ARM EABI v7a System Image</strong></li>
     </ul>
   </li>
   <li>Click <strong>Install</strong>.</li>
  </ol>
</li>

<p>Once you've chosen your packages, click <strong>Install</strong>. The Android SDK Manager
installs the selected packages into your Android SDK environment.</li>
<li>
  <h2 class="norule">Get the support library for additional APIs</h2>

  <div class="sidebox">
    <h3>Why use the support library?</h3>

    <p>The support library is required for:</p>
    <ul>
      <li><a href="{@docRoot}wear/index.html">Android Wear</a></li>
      <li><a href="{@docRoot}tv/index.html">Android TV</a></li>
      <li><a href="{@docRoot}google/play-services/cast.html">Google Cast</a></li>
    </ul>

    <p>The support library also provides these popular APIs:</p>
    <ul>
      <li><a href="{@docRoot}reference/android/support/v4/widget/DrawerLayout.html">Navigation
      drawer</a></li>
      <li><a href="{@docRoot}reference/android/support/v4/view/ViewPager.html">Swipe views</a></li>
      <li><a href="{@docRoot}reference/android/support/v7/app/ActionBar.html">Backward-compatible
      action bar</a></li>
    </ul>
  </div>

  <p>The <a href="{@docRoot}tools/support-library/features.html">Android Support Library</a>
  provides an extended set of APIs that are compatible with most versions of Android.</p>

  <p>To download the support library:</p>
  <ol>
    <li>Open the <strong>Extras</strong> directory and select:
     <ul>
       <li><strong>Android Support Repository</strong></li>
       <li><strong>Android Support Library</strong></li>
     </ul>
    </li>
    <li>Click <strong>Install</strong>.</li>
  </ol>

<p>With these packages installed, you're ready to start developing.
To get started, read <a href="{@docRoot}training/basics/firstapp/index.html"
>Building Your First App</a>.</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>

</li>

<img src="/images/sdk_manager_packages.png" alt="" height="396" />
<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager shows the
SDK packages that are available, already installed, or for which an update is available.</p>

<li>
  <h2 class="norule">Get Google Play services for even more APIs</h2>

  <div class="sidebox">
    <h3>Why use Google Play services?</h3>

<h3>Additional information</h3>
    <p>The Google Play services APIs provide a variety of features and services for your Android
    apps, such as:</p>
    <ul>
      <li><a href="{@docRoot}google/play-services/plus.html">User authentication</a></li>
      <li><a href="{@docRoot}google/play-services/maps.html">Google Maps</a></li>
      <li><a href="{@docRoot}google/play-services/cast.html">Google Cast</a></li>
      <li><a href="{@docRoot}google/play-services/games.html">Games achievements and
      leaderboards</a></li>
      <li><a href="{@docRoot}google/play-services/index.html">And much more</a></li>
    </ul>
  </div>

  <p>To develop with Google APIs, you need the Google Play services package:</p>
  <ol>
    <li>Open the <strong>Extras</strong> directory and select:
     <ul>
  <li>For more information about using the SDK Manager and some of the available packages,
see the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> document.</li>
  <li>This web site provides all information you need to develop Android apps, including <a
href="{@docRoot}design/index.html">design guidelines</a>,
<a href="{@docRoot}training/index.html">developer training</a>, <a
href="{@docRoot}reference/packages.html">API reference</a>, and information
about how you can <a href="{@docRoot}distribute/index.html">distribute your app</a>. We recommend
you begin by reading <a href="{@docRoot}training/basics/firstapp/index.html"
>Building Your First App</a>.</li>
  <li>For additional resources about developing and distributing your app, see the
<a href="{@docRoot}support.html">Developer Support Resources</a>.</li>
       <li><strong>Google Repository</strong></li>
       <li><strong>Google Play services</strong></li>
     </ul>
    </li>
    <li>Click <strong>Install</strong>.</li>
  </ol>

  <p class="note"><strong>Note:</strong> Google Play services APIs are not available on all
  Android-powered devices, but are available on all devices with Google Play Store. To use these
  APIs in the Android emulator, you must also install the the <strong>Google APIs</strong>
  system image from the latest Android X.X directory in the SDK Manager.</p>
</li>



<li>
  <h2 class="norule">Build something!</h2>

<p>With the above packages now in your Android SDK, you're ready to build apps
for Android. As new tools and other APIs become available, simply launch the SDK Manager
  to download the new packages for your SDK.</p>

<p>Here are a few options for how you should proceed:</p>

<div class="cols" style="padding:10px 0">
<div class="col-4">
<h3>Get started</h3>
<p>If you're new to Android development, learn the basics of Android apps by following
the guide to <strong><a href="{@docRoot}training/basics/firstapp/index.html"
>Building Your First App</a></strong>.</p>

</div>
<div class="col-4 box">
<h3>Build for wearables</h3>
<p>If you're ready to start building apps for Android wearables, see the guide to
<strong><a href="{@docRoot}wear/preview/start.html">Building Apps for Android Wear</a></strong>.</p>

</div>
<div class="col-4 box">
<h3>Use Google APIs</h3>
<p>To start using Google APIs, such as Maps or
Play Game services, see the guide to
<strong><a href="{@docRoot}google/auth/api-client.html">Accessing Google Play Services
APIs</a></strong>.</p>

</div>
</div><!-- end cols -->


</li>

</ol>

+0 −42
Original line number Diff line number Diff line
page.title=Setting Up the ADT Bundle

@jd:body


<p>The ADT Bundle provides everything you need to start developing apps, including
a version of the Eclipse IDE with built-in <b>ADT (Android Developer Tools)</b> to
streamline your Android app development.
If you haven't already, go download the <a href="{@docRoot}sdk/index.html"
>Android ADT Bundle</a>. (If you downloaded the SDK Tools only, for use with an
existing IDE, you should instead read
<a href="{@docRoot}sdk/installing/index.html">Setting Up an Existing IDE</a>.)</p>

<h3>Install the SDK and Eclipse IDE</h3>
<ol>
<li>Unpack the ZIP file
(named {@code adt-bundle-&lt;os_platform>.zip}) and save it to an appropriate location,
such as a "Development" directory in your home directory.</li>
<li>Open the {@code adt-bundle-&lt;os_platform>/eclipse/} directory and launch
<strong>eclipse</strong>.</li>
</ol>

<p>That's it! The IDE is already loaded with the Android Developer Tools plugin and
the SDK is ready to go. To start developing, read <a href="{@docRoot}training/basics/firstapp/index.html"
>Building Your First App</a>.</p>

<p class="caution"><strong>Caution:</strong> Do not move any of the files or directories
from the {@code adt-bundle-&lt;os_platform>} directory. If you move the {@code eclipse}
or {@code sdk} directory, ADT will not be able to locate the SDK and you'll
need to manually update the ADT preferences.</p>

<h3>Additional information</h3>

<p>As you continue developing apps, you may need to install additional versions
of Android for the emulator and other packages such as the library for
Google Play In-app Billing. To install more packages, use
the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</p>

<p>Everything you need to develop Android apps is on this web site, including <a
href="{@docRoot}design/index.html">design guidelines</a>,
<a href="{@docRoot}training/index.html">developer training</a>, <a
href="{@docRoot}reference/packages.html">API reference</a>, and information
about how you can <a href="{@docRoot}distribute/index.html">distribute your app</a>.
For additional resources about developing and distributing your app, see the
<a href="{@docRoot}support.html">Developer Support Resources</a>.</p>
 No newline at end of file
+333 −68

File changed.

Preview size limit exceeded, changes collapsed.

Loading