| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 1 | page.title=Installing the Android SDK |
| smain@google.com | 68e6819 | 2014-12-15 10:00:59 -0800 | [diff] [blame] | 2 | excludeFromSuggestions=true |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 3 | |
| smain@google.com | 0da6b00 | 2014-10-31 10:45:23 -0700 | [diff] [blame] | 4 | page.tags=sdk tools |
| smain@google.com | 61139c8 | 2014-10-20 14:29:22 -0700 | [diff] [blame] | 5 | helpoutsWidget=true |
| 6 | |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 7 | @jd:body |
| 8 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 9 | <style> |
| smain@google.com | e77f41a | 2014-06-20 19:06:06 -0700 | [diff] [blame] | 10 | p.paging-links { |
| 11 | margin:0 0 40px; |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 12 | } |
| 13 | .paging-links .next-page-link { |
| 14 | right:initial; |
| 15 | } |
| 16 | .procedure-box { |
| 17 | padding:20px 20px 5px; |
| 18 | margin-bottom:1em; |
| 19 | background:#eee; |
| 20 | } |
| smain@google.com | e77f41a | 2014-06-20 19:06:06 -0700 | [diff] [blame] | 21 | .landing-button { |
| 22 | min-width: 155px; |
| 23 | text-align: center; |
| 24 | } |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 25 | </style> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 26 | |
| 27 | |
| Scott Main | 6453dfb | 2012-10-23 14:14:18 -0700 | [diff] [blame] | 28 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 29 | <!-- ################ STUDIO ##################### --> |
| 30 | <div id="studio" heading="Installing Android Studio" style="display:none"> |
| 31 | |
| smain@google.com | c4a0882 | 2014-12-08 12:28:25 -0800 | [diff] [blame] | 32 | <p>Android Studio provides everything you need to start developing apps for Android, including |
| 33 | the Android Studio IDE and the Android SDK tools.</p> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 34 | |
| smain@google.com | 29e13c5 | 2014-12-05 09:38:14 -0800 | [diff] [blame] | 35 | <p>If you didn't download Android Studio, go <a href="{@docRoot}sdk/index.html" |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 36 | ><b>download Android Studio now</b></a>, or switch to the |
| smain@google.com | 29e13c5 | 2014-12-05 09:38:14 -0800 | [diff] [blame] | 37 | <a href="{@docRoot}sdk/installing/index.html?pkg=tools">stand-alone SDK Tools |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 38 | install</a> instructions.</p> |
| 39 | |
| 40 | |
| 41 | <p>Before you set up Android Studio, be sure you have installed |
| smain@google.com | c4a0882 | 2014-12-08 12:28:25 -0800 | [diff] [blame] | 42 | JDK 6 or higher (the JRE alone is not sufficient)—JDK 7 is required when |
| 43 | developing for Android 5.0 and higher. To check if you |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 44 | have JDK installed (and which version), open a terminal and type <code>javac -version</code>. |
| 45 | If the JDK is not available or the version is lower than 6, |
| 46 | <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" class="external-link" |
| 47 | >go download JDK</a>.</p> |
| 48 | |
| 49 | |
| 50 | <div class="procedure-box"> |
| 51 | |
| 52 | <p id="instructions-toggle" |
| 53 | style="float:right;font-size:13px"><a href='' onclick='showAll();return false;' |
| 54 | >[ Show instructions for all platforms ]</a></p> |
| 55 | |
| 56 | <div class="win docs" style="display:none"> |
| 57 | |
| 58 | <p><b>To set up Android Studio on Windows:</b></p> |
| 59 | <ol> |
| smain@google.com | 59a3dd7 | 2014-12-08 00:21:15 -0800 | [diff] [blame] | 60 | <li>Launch the <code>.exe</code> file you just downloaded.</li> |
| smain@google.com | c4a0882 | 2014-12-08 12:28:25 -0800 | [diff] [blame] | 61 | <li>Follow the setup wizard to install Android Studio and any necessary SDK tools. |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 62 | |
| 63 | <p>On some Windows systems, the launcher script does not find where Java is installed. |
| 64 | If you encounter this problem, |
| 65 | you need to set an environment variable indicating the correct location.</p> |
| 66 | <p>Select <strong>Start menu > Computer > System Properties > |
| 67 | Advanced System Properties</strong>. Then open <strong>Advanced tab > Environment |
| 68 | Variables</strong> and add a new system variable <code>JAVA_HOME</code> that points to |
| 69 | your JDK folder, for example <code>C:\Program Files\Java\jdk1.7.0_21</code>.</p> |
| 70 | </p> |
| 71 | </li> |
| Ricardo Cervera | 4ffffb8 | 2014-10-01 18:32:42 -0700 | [diff] [blame] | 72 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 73 | </ol> |
| 74 | |
| 75 | |
| Rich Slogar | 96b245a | 2014-10-29 14:54:24 -0700 | [diff] [blame] | 76 | <p>The individual tools and other SDK packages are saved outside the Android Studio application |
| 77 | directory. If you need to access the tools directly, use a terminal to navigate to the location |
| 78 | where they are installed. For example:</p> |
| 79 | <p><code>\Users\<user>\sdk\</code></p> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 80 | |
| 81 | |
| 82 | |
| 83 | </div><!-- end windows --> |
| 84 | |
| 85 | |
| 86 | <div class="mac docs" style="display:none"> |
| 87 | |
| 88 | <p><b>To set up Android Studio on Mac OSX:</b></p> |
| 89 | <ol> |
| smain@google.com | 59a3dd7 | 2014-12-08 00:21:15 -0800 | [diff] [blame] | 90 | <li>Launch the {@code .dmg} file you just downloaded.</li> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 91 | <li>Drag and drop Android Studio into the Applications folder. |
| smain@google.com | c4a0882 | 2014-12-08 12:28:25 -0800 | [diff] [blame] | 92 | <li>Open Android Studio and follow the setup wizard to install any necessary SDK tools. |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 93 | <p> |
| 94 | Depending on your security settings, when you attempt to open Android Studio, you might |
| 95 | see a warning that says the package is damaged and should be moved to the trash. If this |
| 96 | happens, go to <strong>System Preferences > Security & Privacy</strong> and under |
| 97 | <strong>Allow applications downloaded from</strong>, select <strong>Anywhere</strong>. |
| 98 | Then open Android Studio again.</p> |
| 99 | </li> |
| 100 | </ol> |
| 101 | |
| smain@google.com | 59a3dd7 | 2014-12-08 00:21:15 -0800 | [diff] [blame] | 102 | <p>If you need use the Android SDK tools from a command line, |
| 103 | you can access them at:</p> |
| 104 | <p><code>/Users/<user>/Library/Android/sdk/</code></p> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 105 | |
| 106 | |
| 107 | </div><!-- end mac --> |
| 108 | |
| 109 | |
| 110 | <div class="linux docs" style="display:none"> |
| 111 | |
| 112 | <p><b>To set up Android Studio on Linux:</b></p> |
| 113 | |
| 114 | <ol> |
| smain@google.com | 59a3dd7 | 2014-12-08 00:21:15 -0800 | [diff] [blame] | 115 | <li>Unpack the downloaded ZIP file into an |
| Rich Slogar | 96b245a | 2014-10-29 14:54:24 -0700 | [diff] [blame] | 116 | appropriate location for your applications. |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 117 | <li>To launch Android Studio, navigate to the {@code android-studio/bin/} directory |
| 118 | in a terminal and execute {@code studio.sh}. |
| 119 | <p>You may want to add {@code android-studio/bin/} to your PATH environmental |
| 120 | variable so that you can start Android Studio from any directory.</p> |
| 121 | </li> |
| Rich Slogar | be8e623 | 2015-01-21 10:38:38 -0800 | [diff] [blame] | 122 | <li>If the SDK is not already installed, follow the setup wizard to install the SDK and any |
| 123 | necessary SDK tools. |
| 124 | <p class="note"><strong>Note:</strong> You may also need to install the ia32-libs, |
| Rich Slogar | 69044ae | 2015-02-24 16:58:34 -0800 | [diff] [blame] | 125 | lib32ncurses5-dev, and lib32stdc++6 packages. These packages are required to support 32-bit apps |
| Rich Slogar | be8e623 | 2015-01-21 10:38:38 -0800 | [diff] [blame] | 126 | on a 64-bit machine. </p> |
| 127 | </li> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 128 | </ol> |
| 129 | |
| 130 | </div><!-- end linux --> |
| 131 | </div><!-- end procedure box --> |
| 132 | |
| 133 | <p>Android Studio is now ready and loaded with the Android developer tools, but there are still a |
| 134 | couple packages you should add to make your Android SDK complete.</p> |
| 135 | |
| 136 | <p class="paging-links"> |
| 137 | <a href="{@docRoot}sdk/installing/adding-packages.html" class="next-page-link"> |
| 138 | Continue: Adding SDK Packages</a></p> |
| 139 | |
| 140 | |
| 141 | </div> |
| 142 | <!-- ################ END STUDIO ##################### --> |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | <!-- ################ JUST SDK TOOLS ##################### --> |
| 153 | <div id="tools" heading="Installing the Stand-alone SDK Tools" style="display:none"> |
| 154 | |
| 155 | |
| 156 | <p>The stand-alone SDK Tools package does not include a complete Android development environment. |
| 157 | It includes only the core SDK tools, which you can access from a command line or with a plugin |
| 158 | for your favorite IDE (if available).</p> |
| 159 | |
| smain@google.com | 29e13c5 | 2014-12-05 09:38:14 -0800 | [diff] [blame] | 160 | <p>If you didn't download the SDK tools, go <a href="{@docRoot}sdk/index.html#Other" |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 161 | ><b>download the SDK now</b></a>, |
| Joe Fernandez | 3ec76e0 | 2014-12-07 21:48:05 -0800 | [diff] [blame] | 162 | or switch to the <a href="{@docRoot}sdk/installing/index.html?pkg=studio">Android Studio |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 163 | install</a> instructions.</p> |
| 164 | |
| 165 | |
| 166 | <div class="procedure-box"> |
| 167 | <p id="instructions-toggle" |
| 168 | style="float:right;font-size:13px"><a href='' onclick='showAll();return false;' |
| 169 | >[ Show instructions for all platforms ]</a></p> |
| 170 | |
| 171 | <div class="win docs" style="display:none"> |
| 172 | |
| 173 | <p><b>To get started on Windows:</b></p> |
| 174 | |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 175 | <p>Your download package is an executable file that starts an installer. The installer checks your machine |
| 176 | for required tools, such as the proper Java SE Development Kit (JDK) and installs it if necessary. |
| Rich Slogar | 96b245a | 2014-10-29 14:54:24 -0700 | [diff] [blame] | 177 | The installer then saves the Android SDK Tools to a specified the location outside of the Android |
| 178 | Studio directories.</p> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 179 | |
| Scott Main | 6453dfb | 2012-10-23 14:14:18 -0700 | [diff] [blame] | 180 | <ol> |
| 181 | <li>Double-click the executable ({@code .exe} file) to start the install.</li> |
| Rich Slogar | 96b245a | 2014-10-29 14:54:24 -0700 | [diff] [blame] | 182 | <li>Make a note of the name and location where you save the SDK on your system—you will need to |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 183 | refer to the SDK directory later when using |
| Scott Main | 6453dfb | 2012-10-23 14:14:18 -0700 | [diff] [blame] | 184 | the SDK tools from the command line.</li> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 185 | <li>Once the installation completes, the installer starts the Android SDK Manager. |
| Scott Main | 6453dfb | 2012-10-23 14:14:18 -0700 | [diff] [blame] | 186 | </li> |
| 187 | </ol> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 188 | |
| 189 | </div> |
| 190 | |
| Ricardo Cervera | fe8b0ea | 2014-03-28 10:01:41 -0700 | [diff] [blame] | 191 | |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 192 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 193 | <div class="mac docs" style="display:none"> |
| Ricardo Cervera | fe8b0ea | 2014-03-28 10:01:41 -0700 | [diff] [blame] | 194 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 195 | <p><b>To get started on Mac OSX:</b></p> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 196 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 197 | <p>Unpack the ZIP file you've downloaded. By default, it's unpacked |
| smain@google.com | 29e13c5 | 2014-12-05 09:38:14 -0800 | [diff] [blame] | 198 | into a directory named <code>android-sdk-mac_x86</code>. Move it to an appropriate location on your |
| Rich Slogar | 96b245a | 2014-10-29 14:54:24 -0700 | [diff] [blame] | 199 | machine, such as a "Development" directory in your home directory.</p> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 200 | |
| 201 | <p>Make a note of the name and location of the SDK directory on your system—you will need to |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 202 | refer to the SDK directory later when using |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 203 | the SDK tools from the command line.</p> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 204 | |
| 205 | </div> |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 210 | <div class="linux docs" style="display:none"> |
| Ricardo Cervera | fe8b0ea | 2014-03-28 10:01:41 -0700 | [diff] [blame] | 211 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 212 | <p><b>To get started on Linux:</b></p> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 213 | |
| smain@google.com | 29e13c5 | 2014-12-05 09:38:14 -0800 | [diff] [blame] | 214 | <p>Unpack the {@code .zip} file you've downloaded. The SDK files are download separately to a |
| Rich Slogar | 96b245a | 2014-10-29 14:54:24 -0700 | [diff] [blame] | 215 | user-specified directory. </p> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 216 | |
| 217 | <p>Make a note of the name and location of the SDK directory on your system—you will need to |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 218 | refer to the SDK directory later when using |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 219 | the SDK tools from the command line.</p> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 220 | |
| 221 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 222 | <h5 id="Troubleshooting" style="margin-bottom:15px"><a href='' class="expandable" |
| Ricardo Cervera | 43c758b | 2014-10-03 09:44:25 -0700 | [diff] [blame] | 223 | onclick="toggleExpandable(this,'#UbuntuTrouble');return false;" |
| Scott Main | 6453dfb | 2012-10-23 14:14:18 -0700 | [diff] [blame] | 224 | >Troubleshooting Ubuntu</a></h5> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 225 | |
| Ricardo Cervera | 43c758b | 2014-10-03 09:44:25 -0700 | [diff] [blame] | 226 | <div id="UbuntuTrouble" style="display:none"> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 227 | <ul> |
| 228 | <li>If you need help installing and configuring Java on your |
| 229 | development machine, you might find these resources helpful: |
| 230 | <ul> |
| 231 | <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/Java </a></li> |
| 232 | <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/JavaInstallation</a></li> |
| 233 | </ul> |
| 234 | </li> |
| smain@google.com | c4a0882 | 2014-12-08 12:28:25 -0800 | [diff] [blame] | 235 | <li>Here are the steps to install Java: |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 236 | <ol> |
| Ricardo Cervera | fe8b0ea | 2014-03-28 10:01:41 -0700 | [diff] [blame] | 237 | <li><p>If you are running a 64-bit distribution on your development |
| 238 | machine, you need to install additional packages first. For Ubuntu 13.10 (Saucy Salamander) |
| 239 | and above, install the <code>libncurses5:i386</code>, <code>libstdc++6:i386</code>, and |
| 240 | <code>zlib1g:i386</code> packages using <code>apt-get</code>:</p> |
| 241 | <pre class="no-pretty-print">sudo dpkg --add-architecture i386 |
| 242 | sudo apt-get update |
| 243 | sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386</pre> |
| 244 | <p>For earlier versions of Ubuntu, install the <code>ia32-libs</code> package using |
| 245 | <code>apt-get</code>:</p> |
| 246 | <pre class="no-pretty-print">apt-get install ia32-libs</pre> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 247 | </li> |
| Ricardo Cervera | fe8b0ea | 2014-03-28 10:01:41 -0700 | [diff] [blame] | 248 | <li>Next, install Java: <pre class="no-pretty-print">apt-get install sun-java6-jdk</pre></li> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 249 | </ol> |
| 250 | </li> |
| 251 | </ul> |
| Scott Main | 6453dfb | 2012-10-23 14:14:18 -0700 | [diff] [blame] | 252 | </div><!-- end ubuntu trouble --> |
| 253 | |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 254 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 255 | </div><!-- end linux --> |
| 256 | </div><!-- end procedure box --> |
| 257 | |
| 258 | |
| 259 | <p>The Android SDK tools are now ready to begin developing apps, but there are still a |
| 260 | couple packages you should add to make your Android SDK complete.</p> |
| 261 | |
| 262 | <p class="paging-links"> |
| 263 | <a href="{@docRoot}sdk/installing/adding-packages.html" class="next-page-link"> |
| 264 | Continue: Adding SDK Packages</a></p> |
| 265 | |
| 266 | |
| 267 | </div> |
| 268 | <!-- ################ END JUST TOOLS ##################### --> |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| smain@google.com | 29e13c5 | 2014-12-05 09:38:14 -0800 | [diff] [blame] | 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 278 | |
| 279 | <!-- ################ DEFAULT ##################### --> |
| smain@google.com | e77f41a | 2014-06-20 19:06:06 -0700 | [diff] [blame] | 280 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 281 | |
| 282 | <div id="default" style="display:none"> |
| 283 | |
| smain@google.com | e77f41a | 2014-06-20 19:06:06 -0700 | [diff] [blame] | 284 | <p>If you haven't already, <b><a href="{@docRoot}sdk/index.html">download |
| Joe Fernandez | 3ec76e0 | 2014-12-07 21:48:05 -0800 | [diff] [blame] | 285 | the Android SDK bundle for Android Studio</a></b> or the |
| 286 | <a href="{@docRoot}sdk/index.html#Other">stand-alone SDK Tools</a>. </p> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 287 | |
| Joe Fernandez | 3ec76e0 | 2014-12-07 21:48:05 -0800 | [diff] [blame] | 288 | <p>Then, select which SDK bundle you want to install:</p> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 289 | |
| smain@google.com | e77f41a | 2014-06-20 19:06:06 -0700 | [diff] [blame] | 290 | <div class="cols" style="margin:30px 0 60px"> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 291 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 292 | <div class="col-4"> |
| smain@google.com | e77f41a | 2014-06-20 19:06:06 -0700 | [diff] [blame] | 293 | <a href="{@docRoot}sdk/installing/index.html?pkg=studio" class="landing-button landing-secondary"> |
| 294 | Android Studio |
| 295 | </a> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 296 | </div> |
| 297 | |
| 298 | <div class="col-4"> |
| smain@google.com | e77f41a | 2014-06-20 19:06:06 -0700 | [diff] [blame] | 299 | <a href="{@docRoot}sdk/installing/index.html?pkg=tools" class="landing-button landing-secondary"> |
| 300 | Stand-alone SDK Tools |
| 301 | </a> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 302 | </div> |
| 303 | </div> |
| 304 | |
| smain@google.com | 29e13c5 | 2014-12-05 09:38:14 -0800 | [diff] [blame] | 305 | <p></p> |
| 306 | |
| 307 | <div> |
| 308 | <p></p> |
| 309 | |
| 310 | </div> |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 311 | |
| 312 | </div> |
| 313 | <!-- ################ END DEFAULT ##################### --> |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 319 | |
| 320 | <script> |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 321 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 322 | // Show proper instructions based on downloaded SDK package |
| 323 | var package = getUrlParam("pkg"); |
| 324 | if (package == "tools") { |
| 325 | // Show the SDK Tools (other IDE) instructions |
| 326 | $("h1").text($("#tools").attr('heading')); |
| 327 | $("#tools").show(); |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 328 | } else if (package == "studio") { |
| 329 | // Show the Android Studio instructions |
| 330 | $("h1").text($("#studio").attr('heading')); |
| 331 | $("#studio").show(); |
| 332 | } else { |
| 333 | // Show the default page content so user can select their setup |
| 334 | $("#default").show(); |
| 335 | } |
| Ricardo Cervera | fe8b0ea | 2014-03-28 10:01:41 -0700 | [diff] [blame] | 336 | |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 337 | // Show the proper instructions based on machine OS |
| 338 | var $osDocs; |
| 339 | if (navigator.appVersion.indexOf("Win")!=-1) { |
| 340 | $osDocs = $('.win'); |
| 341 | } else if (navigator.appVersion.indexOf("Mac")!=-1) { |
| 342 | $osDocs = $('.mac'); |
| 343 | } else if (navigator.appVersion.indexOf("Linux")!=-1) { |
| 344 | $osDocs = $('.linux'); |
| 345 | } |
| 346 | |
| 347 | if ($osDocs.length) { |
| 348 | // reveal only the docs for this OS |
| 349 | $osDocs.show(); |
| 350 | } else { |
| 351 | // not running a compatible OS, so just show all the docs |
| 352 | $('.docs').show(); |
| 353 | } |
| 354 | |
| 355 | |
| 356 | /* Shows all the machine OS instructions */ |
| 357 | function showAll() { |
| 358 | $('.docs').show(); |
| 359 | $("#instructions-toggle").hide(); |
| 360 | } |
| 361 | |
| 362 | /* Returns the value for the given URL parameter */ |
| 363 | function getUrlParam(param) { |
| 364 | var url = window.location.search.substring(1); |
| 365 | var variables = url.split('&'); |
| 366 | for (var i = 0; i < variables.length; i++) { |
| 367 | var paramName = variables[i].split('='); |
| 368 | if (escape(paramName[0]) == param) { |
| 369 | return escape(paramName[1]); |
| 370 | } |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 371 | } |
| Scott Main | 4795031 | 2014-05-29 17:44:09 -0700 | [diff] [blame] | 372 | } |
| 373 | |
| Ricardo Cervera | 4ffffb8 | 2014-10-01 18:32:42 -0700 | [diff] [blame] | 374 | /* direct link to ubuntu troubleshooting */ |
| Ricardo Cervera | 43c758b | 2014-10-03 09:44:25 -0700 | [diff] [blame] | 375 | if ( document.location.href.indexOf('#UbuntuTrouble') > -1 ) { |
| Ricardo Cervera | 4ffffb8 | 2014-10-01 18:32:42 -0700 | [diff] [blame] | 376 | $(".linux.docs").show(); |
| Ricardo Cervera | 43c758b | 2014-10-03 09:44:25 -0700 | [diff] [blame] | 377 | toggleExpandable(this,'#UbuntuTrouble'); |
| Ricardo Cervera | 4ffffb8 | 2014-10-01 18:32:42 -0700 | [diff] [blame] | 378 | } |
| Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 379 | </script> |