Home | History | Annotate | Download | only in installing
      1 page.title=Adding Platforms and Packages
      2 walkthru=1
      3 
      4 @jd:body
      5 
      6 
      7 <p>The Android SDK separates different parts of the SDK into separately downloadable packages. The
      8 SDK starter package that you've installed includes only the SDK Tools. To develop an Android app,
      9 you also need to download at least one Android platform and the latest SDK Platform-tools.</p>
     10 
     11 <p>You can update and install SDK packages at any time using the Android SDK Manager.</p>
     12 
     13 <p>If you've used the Windows installer to install the SDK tools, you should already have the
     14 Android SDK Manager open. Otherwise, you can launch the Android SDK Manager in one of the following
     15 ways:</p>
     16 <ul>
     17   <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
     18 SDK directory.</li>
     19   <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
     20 Android SDK, then execute <code>android sdk</code>.</li>
     21 </ul>
     22 
     23 <p>When you open the Android SDK Manager, it automatically selects a set of recommended packages.
     24 Simply click <strong>Install</strong> to install the recommended packages. The Android SDK Manager
     25 installs the selected packages into
     26 your Android SDK environment. The following sections describe some of the available SDK
     27 packages and more about which ones we recommend you install.</p>
     28 
     29 <p>Once you have installed your packages, continue to the next page.</p>
     30 
     31 <img src="/images/sdk_manager_packages.png" alt="" />
     32 <p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager shows the
     33 SDK packages that are available, already installed, or for which an update is available.</p>
     34 
     35 
     36 
     37 
     38 <h2 id="Recommended">Recommended Packages</h2>
     39 
     40 <p>Here's an outlines of the packages required and those we recommend you use:
     41 </p>
     42 
     43 <dl>
     44   <dt>SDK Tools</dt>
     45   <dd><strong>Required.</strong> Your new SDK installation already has the latest version. Make sure
     46 you keep this up to date.</dd>
     47   <dt>SDK Platform-tools</dt>
     48   <dd><strong>Required.</strong> You must install this package when you install the SDK for
     49 the first time.</dd>
     50   <dt>SDK Platform</dt>
     51   <dd><strong>Required.</strong>You need to download <strong
     52 style="color:red">at least one platform</strong> into your environment so you're
     53 able to compile your application. In order to provide the best user experience on the latest
     54 devices, we recommend that you use the latest platform version as your build target. You'll
     55 still be able to run your app on older versions, but you must build against the latest version
     56 in order to use new features when running on devices with the latest version of Android.</dd>
     57   <dt>System Image</dt>
     58   <dd>Recommended. Although you might have one or more Android-powered devices on which to test
     59  your app, it's unlikely you have a device for every version of Android your app supports. It's
     60 a good practice to download a system image for each version of Android you support and use them
     61 to test your app on the Android emulator.</dd>
     62   <dt>SDK Samples</dt>
     63   <dd>Recommended. The samples give you source code that you can use to learn about
     64 Android, load as a project and run, or reuse in your own app. Note that multiple
     65 samples packages are available &mdash; one for each Android platform version. When
     66 you are choosing a samples package to download, select the one whose API Level
     67 matches the API Level of the Android platform that you plan to use.</dd>
     68   <dt>Android Support</dt>
     69   <dd>Recommended. The APIs available in this static library allow you to use a variety of new
     70 framework features (including some not available in even the latest version) on devices running
     71 a platform version as old as Android 1.6. For more information, read <a
     72 href="{@docRoot}tools/extras/support-library.html">Support Library</a>.</dd>
     73 </dl>
     74 
     75 
     76 <p class="note"><strong>Tip:</strong> For easy access to the SDK tools from a command line, add the
     77 location of the SDK's <code>tools/</code> and
     78 <code>platform-tools</code> to your <code>PATH</code> environment variable.</p>
     79