Dirk Dougherty | ee58d1b | 2009-10-16 15:25:15 -0700 | [diff] [blame] | 1 | page.title=Adding SDK Components |
| 2 | @jd:body |
| 3 | |
| 4 | |
| 5 | <div id="qv-wrapper"> |
| 6 | <div id="qv"> |
| 7 | <h2>Quickview</h2> |
| 8 | <ul> |
| 9 | <li>Use the Android SDK and AVD Manager to |
| 10 | keep your SDK up-to-date without having to install new |
| 11 | SDK directories.</li> |
| 12 | <li>The Android SDK and AVD Manager is available only with the |
| 13 | Android 1.6 SDK or later.</li> |
| 14 | <li>The Eclipse ADT plugin may require an update when installing |
| 15 | new tools or system images.</li> |
| 16 | </ul> |
| 17 | |
| 18 | <h2>In this document</h2> |
| 19 | <ol> |
| 20 | <li><a href="#InstallingComponents">Installing SDK Components</a> |
| 21 | <ol> |
| 22 | <li><a href="#AddingSites">Adding New Sites</a></li> |
| 23 | </ol> |
| 24 | </li> |
| 25 | <li><a href="#dependencies">Component Dependencies</a></li> |
| 26 | </ol> |
| 27 | </div> |
| 28 | </div> |
| 29 | |
| 30 | <p>Adding and updating components in your Android SDK is fast and easy. To |
| 31 | perform an update, use the <strong>Android SDK and AVD Manager</strong> to |
| 32 | install or update the individual SDK components that you need. The Android SDK |
| 33 | and AVD Manager tool is included in Android 1.6 and later SDK packages.</p> |
| 34 | |
| 35 | <p>It only takes a couple of clicks to install |
| 36 | individual versions of the Android platform, new development tools, new documentation, and |
| 37 | SDK add-ons. The new SDK components are automatically installed into your existing SDK |
| 38 | directory, so you don't need to update your development environment to specify a |
| 39 | new SDK location.</p> |
| 40 | |
| 41 | <p>Because each version of the Android platform can be installed as an individual component |
| 42 | of your SDK, you can customize your development environment to the Android platforms |
| 43 | you are targetting. Testing your app on multiple versions of |
| 44 | the platform is very important in order to successfully operate on as many devices as possible. |
| 45 | Be sure to install each version of the Android platform with which your app is compatible, then test |
| 46 | your apps on <a href="{@docRoot}guide/developing/tools/avd.html">AVDs</a> that run each platform.</p> |
| 47 | |
| 48 | <p>If you develop applications using Eclipse, you may also need to update your |
| 49 | ADT plugin when you update your development tools or in order to compile against |
| 50 | a new version of the platform. See the <a |
| 51 | href="{@docRoot}sdk/tools-notes.html">SDK Tools Notes</a> document for ADT |
| 52 | compatibility.</p> |
| 53 | |
| 54 | |
| 55 | <h2 id="InstallingComponents">Installing SDK Components</h2> |
| 56 | |
| 57 | <p>Use the Android SDK and AVD Manager to install new SDK components. |
Dirk Dougherty | eeb0b25 | 2009-10-22 16:08:32 -0700 | [diff] [blame] | 58 | You can launch the SDK and AVD Manager in one of these ways:</p> |
Dirk Dougherty | ee58d1b | 2009-10-16 15:25:15 -0700 | [diff] [blame] | 59 | <ul> |
| 60 | <li>Execute the {@code android}</a> tool command with no options. If you |
| 61 | haven't used the tool before, change to the <code><sdk>/tools</code> |
| 62 | directory and run the command: |
| 63 | <pre style="width:400px">$ android</pre></li> |
| 64 | <li>If you have downloaded the SDK Tools (Revision 3 or higher) and are |
| 65 | running Windows, you can double-click "SDK Setup.exe" in the SDK directory. |
| 66 | <li>If you are developing in Eclipse with ADT, you can select |
| 67 | <strong>Window</strong> ><strong>Android SDK and AVD Manager</strong>.</li> |
| 68 | </ul> |
| 69 | |
| 70 | <img src="{@docRoot}images/sdk_manager_packages.png" alt="" style="float:right" /> |
| 71 | |
| 72 | <p>When a new platform version, add-on, set of development tools or |
| 73 | documentation becomes available, you can quickly install them into your existing |
| 74 | Android SDK:</p> |
| 75 | <ol> |
| 76 | <li>Select <strong>Available Components</strong> in the left panel. |
| 77 | This will reveal all components currently available for download.</li> |
| 78 | <li>Select the components you'd like to install and click <strong>Install |
| 79 | Selected</strong>.</li> |
| 80 | <li>Verify and accept the components you want and click <strong>Install |
| 81 | Accepted</strong>. The components will now be installed into your existing |
| 82 | Android SDK directories.</li> |
| 83 | </ol> |
| 84 | |
| 85 | <p>New platforms are automatically saved into the |
| 86 | <code><em><sdk>/</em>platforms/</code> directory of your SDK; |
| 87 | new add-ons are saved in the <code><em><sdk>/</em>add-ons/</code> |
| 88 | directory; and new documentation is saved in the existing |
| 89 | <code><em><sdk>/</em>docs/</code> directory (old docs are replaced).</p> |
| 90 | |
| 91 | <p class="note"><strong>Tip:</strong> |
| 92 | Use the "Display updates only" checkbox to show only the components |
| 93 | you do not have.</p> |
| 94 | |
| 95 | |
| 96 | <h3 id="AddingSites">Adding New Sites</h3> |
| 97 | |
Dirk Dougherty | eeb0b25 | 2009-10-22 16:08:32 -0700 | [diff] [blame] | 98 | <p>By default, <strong>Available Components</strong> only shows the default |
| 99 | repository site, which offers platforms, SDK tools, documentation, the |
| 100 | Google APIs Add-on, and other components. You can add other sites that host |
| 101 | their own Android SDK add-ons, then download the SDK add-ons |
| 102 | from those sites.</p> |
Dirk Dougherty | ee58d1b | 2009-10-16 15:25:15 -0700 | [diff] [blame] | 103 | |
Dirk Dougherty | eeb0b25 | 2009-10-22 16:08:32 -0700 | [diff] [blame] | 104 | <p>For example, a mobile carrier or device manufacturer might offer additional |
Dirk Dougherty | ee58d1b | 2009-10-16 15:25:15 -0700 | [diff] [blame] | 105 | API libraries that are supported by their own Android-powered devices. In order |
| 106 | to develop using their libraries, you must install their Android SDK add-on. </p> |
| 107 | |
| 108 | <p>If a carrier or device manufacturer has hosted an SDK add-on repository file |
| 109 | on their web site, follow these steps to add their site to the SDK and AVD |
| 110 | Manager:</p> |
| 111 | |
| 112 | <ol> |
| 113 | <li>Select <strong>Available Components</strong> in the left panel.</li> |
| 114 | <li>Click <strong>Add Site</strong> and enter the URL of the |
| 115 | {@code repository.xml} file. Click <strong>OK</strong>.</li> |
| 116 | </ol> |
| 117 | <p>Any SDK components available from the site will now be listed under |
| 118 | <strong>Available Components</strong>.</p> |
| 119 | |
| 120 | |
| 121 | <h2 id="dependencies">SDK Component Dependencies</h2> |
| 122 | |
| 123 | <p>In some cases, a specific SDK component may require a specific minimum |
| 124 | version of another component or SDK tool. Such dependencies are documented |
| 125 | in the release notes for each component. </p> |
| 126 | |
| 127 | <p>For example, there may be a dependency between the ADT plugin for Eclipse and |
| 128 | a specific version of the SDK Tools component. When you install the SDK Tools |
| 129 | component, you would then need to upgrade to the required version of ADT (if you |
| 130 | are developing in Eclipse). In this case, you would find dependencies listed in |
| 131 | the <a href="{@docRoot}sdk/adt-notes.html">ADT Plugin Notes</a> and <a |
| 132 | href="{@docRoot}sdk/tools-notes.html">SDK Tools Notes</a> documents. </p> |
| 133 | |
| 134 | <p>Additionally, the development tools will notify you with debug warnings |
| 135 | if there is dependency that you need to address. </p> |
| 136 | |
| 137 | |
| 138 | |
| 139 | |