blob: fb45e48596b1cefaf68823f37b67185d6e5b4e21 [file] [log] [blame]
Dirk Dougherty541b4942014-02-14 18:31:53 -08001<?cs include:"doctype.cs" ?>
2<?cs include:"macros.cs" ?>
Dirk Dougherty82e929d2016-01-30 14:04:37 -08003<?cs include:"../../../../frameworks/base/docs/html/sdk/sdk_vars.cs" ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -08004<html<?cs if:devsite ?> devsite<?cs /if ?>>
5<?cs if:sdk.redirect ?>
6 <head>
7 <title>Redirecting...</title>
8 <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
9 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
10 else ?>index.html<?cs /if ?>">
11 </head>
12<?cs else ?>
13 <?cs include:"head_tag.cs" ?>
14<?cs /if ?>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080015<body class="gc-documentation
16 <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
17 elif:design ?>design<?cs
18 elif:distribute ?>distribute<?cs
Dirk Dougherty541b4942014-02-14 18:31:53 -080019 /if ?>" itemscope itemtype="http://schema.org/CreativeWork">
20 <a name="top"></a>
21<?cs include:"header.cs" ?>
22
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080023
24<div <?cs if:fullpage
25?><?cs else
26?>class="col-13" id="doc-col"<?cs /if ?> >
27
Dirk Dougherty541b4942014-02-14 18:31:53 -080028<?cs if:sdk.redirect ?>
29
30<div class="g-unit">
31 <div id="jd-content">
32 <p>Redirecting to
33 <a href="<?cs var:toroot ?>sdk/<?cs
34 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
35 else ?>index.html<?cs /if ?>"><?cs
36 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
37 else ?>Download the SDK<?cs /if ?>
38 </a> ...</p>
39
40<?cs else ?>
41<?cs # else, if NOT redirect ...
42#
43#
44# The following is for SDK/NDK pages
45#
46#
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080047?>
Dirk Dougherty541b4942014-02-14 18:31:53 -080048
49<?cs if:header.hide ?><?cs else ?>
50<h1 itemprop="name"><?cs var:page.title ?></h1>
51<?cs /if ?>
52 <div id="jd-content" itemprop="description">
53
54<?cs if:sdk.not_latest_version ?>
55 <div class="special">
56 <p><strong>This is NOT the current Android SDK release.</strong></p>
57 <p><a href="/sdk/index.html">Download the current Android SDK</a></p>
58 </div>
59<?cs /if ?>
60
61
62<?cs if:ndk ?>
63<?cs #
64#
65#
66#
67#
68#
69#
70# the following is for the NDK
71#
72# (nested in if/else redirect)
73#
74#
75#
76#
77?>
78
79 <table class="download" id="download-table">
80 <tr>
81 <th>Platform</th>
82 <th>Package</th>
83 <th style="white-space:nowrap">Size (Bytes)</th>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080084 <th>SHA1 Checksum</th>
Dirk Dougherty541b4942014-02-14 18:31:53 -080085 </tr>
86 <tr>
87 <td>Windows 32-bit</td>
88 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080089 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
90 href="http://dl.google.com/android/repository/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -080091 </td>
92 <td><?cs var:ndk.win32_bytes ?></td>
93 <td><?cs var:ndk.win32_checksum ?></td>
94 </tr>
95 <!-- <tr>
96 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080097 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
Dirk Dougherty541b4942014-02-14 18:31:53 -080098 href="http://dl.google.com/android/ndk/<?cs var:ndk.win32.legacy_download ?>"><?cs var:ndk.win32.legacy_download ?></a>
99 </td>
100 <td><?cs var:ndk.win32.legacy_bytes ?></td>
101 <td><?cs var:ndk.win32.legacy_checksum ?></td>
102 </tr> -->
103 <tr>
104 <td>Windows 64-bit</td>
105 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800106 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
107 href="http://dl.google.com/android/repository/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800108 </td>
109 <td><?cs var:ndk.win64_bytes ?></td>
110 <td><?cs var:ndk.win64_checksum ?></td>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700111 </tr>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800112 <!-- <tr>
113 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800114 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
115 href="http://dl.google.com/android/repository/<?cs var:ndk.win64.legacy_download ?>"><?cs var:ndk.win64.legacy_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800116 </td>
117 <td><?cs var:ndk.win64.legacy_bytes ?></td>
118 <td><?cs var:ndk.win64.legacy_checksum ?></td>
119 </tr> -->
Dirk Dougherty0dc81b92015-12-08 14:49:52 -0800120<!-- (this item is deprecated)
Dirk Dougherty541b4942014-02-14 18:31:53 -0800121 <tr>
122 <td>Mac OS X 32-bit</td>
123 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800124 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
125 href="http://dl.google.com/android/repository/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800126 </td>
127 <td><?cs var:ndk.mac32_bytes ?></td>
128 <td><?cs var:ndk.mac32_checksum ?></td>
Dirk Dougherty0dc81b92015-12-08 14:49:52 -0800129 </tr> -->
130 <!-- (this item is deprecated)
131 <tr>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800132 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800133 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
134 href="http://dl.google.com/android/repository/<?cs var:ndk.mac32.legacy_download ?>"><?cs var:ndk.mac32.legacy_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800135 </td>
136 <td><?cs var:ndk.mac32.legacy_bytes ?></td>
137 <td><?cs var:ndk.mac32.legacy_checksum ?></td>
138 </tr> -->
139 <td>Mac OS X 64-bit</td>
140 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800141 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
142 href="http://dl.google.com/android/repository/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800143 </td>
144 <td><?cs var:ndk.mac64_bytes ?></td>
145 <td><?cs var:ndk.mac64_checksum ?></td>
146 </tr>
147 <!-- <tr>
148 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800149 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
150 href="http://dl.google.com/android/repository/<?cs var:ndk.mac64.legacy_download ?>"><?cs var:ndk.mac64.legacy_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800151 </td>
152 <td><?cs var:ndk.mac64.legacy_bytes ?></td>
153 <td><?cs var:ndk.mac64.legacy_checksum ?></td>
154 </tr> -->
Dirk Dougherty541b4942014-02-14 18:31:53 -0800155 <!-- <tr>
156 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800157 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
158 href="http://dl.google.com/android/repository/<?cs var:ndk.linux32.legacy_download ?>"><?cs var:ndk.linux32.legacy_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800159 </td>
160 <td><?cs var:ndk.linux32.legacy_bytes ?></td>
161 <td><?cs var:ndk.linux32.legacy_checksum ?></td>
162 </tr> -->
163 <tr>
164 <td>Linux 64-bit (x86)</td>
165 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800166 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
167 href="http://dl.google.com/android/repository/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800168 </td>
169 <td><?cs var:ndk.linux64_bytes ?></td>
170 <td><?cs var:ndk.linux64_checksum ?></td>
171 </tr>
172 <!-- <tr>
173 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800174 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos"
175 href="http://dl.google.com/android/repository/<?cs var:ndk.linux64.legacy_download ?>"><?cs var:ndk.linux64.legacy_download ?></a>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800176 </td>
177 <td><?cs var:ndk.linux64.legacy_bytes ?></td>
178 <td><?cs var:ndk.linux64.legacy_checksum ?></td>
179 </tr> -->
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700180
Dirk Dougherty541b4942014-02-14 18:31:53 -0800181 </table>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700182
Dirk Dougherty541b4942014-02-14 18:31:53 -0800183 <?cs ######## HERE IS THE JD DOC CONTENT ######### ?>
184 <?cs call:tag_list(root.descr) ?>
185
186
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800187<?cs ######## The NDK version of the download script ######### ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800188<script>
189 function onDownload(link) {
190
191 $("#downloadForRealz").html("Download " + $(link).text());
192 $("#downloadForRealz").attr('href',$(link).attr('href'));
193
Dirk Dougherty541b4942014-02-14 18:31:53 -0800194 return false;
195 }
196
197
198 function onAgreeChecked() {
199 if ($("input#agree").is(":checked")) {
200 $("a#downloadForRealz").removeClass('disabled');
201 } else {
202 $("a#downloadForRealz").addClass('disabled');
203 }
204 }
205
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800206
207 function onDownloadForRealz(link) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800208 if ($("input#agree").is(':checked')) {
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800209 $("div.sdk-terms").slideUp();
210 $("h2#tos-header").text('Now downloading...');
211 $(".sdk-terms-intro").text('Your download is in progress.');
212 $("#sdk-terms-form").fadeOut('slow', function() {
213 setTimeout(function() {
214 // close the dialog
215 $('#ndk_tos').trigger('modal-close');
216 // reload to refresh the tos or optionally forward the user
217 location.reload();
218 }, 3000);
Dirk Dougherty541b4942014-02-14 18:31:53 -0800219 });
smain@google.com72818022016-04-04 16:17:01 -0700220 ga('send', 'event', 'SDK', 'NDK tools', $("#downloadForRealz").html());
Dirk Dougherty541b4942014-02-14 18:31:53 -0800221 return true;
222 } else {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800223 return false;
224 }
225 }
226
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800227
Dirk Dougherty541b4942014-02-14 18:31:53 -0800228 $(window).hashchange( function(){
229 if (location.hash == "") {
230 location.reload();
231 }
232 });
233
234</script>
235
236 <?cs else ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700237<?cs # end if NDK ...
Dirk Dougherty541b4942014-02-14 18:31:53 -0800238#
239#
240#
241#
242#
243#
244# the following is for the SDK
245#
246# (nested in if/else redirect and if/else NDK)
247#
248#
249#
250#
251?>
252 <?cs if:android.whichdoc == "online" ?>
253
254
255<?cs ######## HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?>
256<?cs call:tag_list(root.descr) ?>
257
258
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800259<section id="downloads" class="dac-section dac-small">
260<div class="wrap">
261
262<h2 class="norule">Start using Android Studio today</h2>
263
264<p>Android Studio includes all the tools you need to build apps for Android.</p>
265
266<div style="float:left;margin-right:40px;width:auto;">
267<p>
268 <a class="landing-button green download-bundle-button"
269 data-modal-toggle="studio_tos">Download Android Studio 2.0<br>
270 <span class="small"></span></a>
271</p>
272</div>
273
274<div style="float:left;width:auto;margin-bottom:40px">
275<ul class="nolist" style="text-transform: uppercase;margin:8px 0">
276<li>Version: <?cs var:studio.version ?></li>
277<li>Release date: <?cs var:studio.release.date ?></li>
278</ul>
279</div>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800280
281
Dirk Doughertye21bed22014-05-02 15:14:04 -0700282
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800283<h4 style="clear:left;margin-top:40px">Select a different platform</h4>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700284
Dirk Dougherty541b4942014-02-14 18:31:53 -0800285 <table class="download">
286 <tr>
287 <th>Platform</th>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800288 <th>Android Studio package</th>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800289 <th>Size</th>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800290 <th>SHA-1 checksum</th>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800291 </tr>
292 <tr>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700293 <td rowspan="3">Windows</td>
294 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800295 <a onclick="return onDownload(this,false,true)" id="win-bundle" data-modal-toggle="studio_tos"
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700296 href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_bundle_exe_download ?>"
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800297 ><?cs var:studio.win_bundle_exe_download ?></a><br>
smain@google.com6b2a9862016-04-06 17:21:37 -0700298 Includes Android SDK <b>(recommended)</b>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700299 </td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800300 <td id="win-bundle-size"><?cs call:size_in_mb(studio.win_bundle_exe_bytes) ?> MB
301 <br>(<?cs var:studio.win_bundle_exe_bytes ?> bytes)</td>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700302 <td><?cs var:studio.win_bundle_exe_checksum ?></td>
303 </tr>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700304 <tr>
305 <!-- blank TD from Windows rowspan -->
306 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800307 <a onclick="return onDownload(this,false,true)" id="win-bundle-notools" data-modal-toggle="studio_tos"
308 href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_notools_exe_download ?>"
309 ><?cs var:studio.win_notools_exe_download ?></a><br>
smain@google.com6e90dbf2016-04-06 20:22:46 -0700310 No Android SDK
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800311 </td>
312 <td><?cs call:size_in_mb(studio.win_notools_exe_bytes) ?> MB
313 <br>(<?cs var:studio.win_notools_exe_bytes ?> bytes)</td>
314 <td><?cs var:studio.win_notools_exe_checksum ?></td>
315 </tr>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700316 <tr>
smain@google.com6e90dbf2016-04-06 20:22:46 -0700317 <!-- blank TD from Windows rowspan -->
318 <td>
319 <a onclick="return onDownload(this,false,true)" id="win-bundle-zip" data-modal-toggle="studio_tos"
320 href="https://dl.google.com/dl/android/studio/ide-zips/<?cs var:studio.version ?>/<?cs var:studio.win_bundle_download ?>"
321 ><?cs var:studio.win_bundle_download ?></a><br>
322 No Android SDK, no installer
323 </td>
324 <td><?cs call:size_in_mb(studio.win_bundle_bytes) ?> MB
325 <br>(<?cs var:studio.win_bundle_bytes ?> bytes)</td>
326 <td><?cs var:studio.win_bundle_checksum ?></td>
327 </tr>
328 <tr>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700329 <td><nobr>Mac OS X</nobr></td>
330 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800331 <a onclick="return onDownload(this,false,true)" id="mac-bundle" data-modal-toggle="studio_tos"
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700332 href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.mac_bundle_download ?>"
333 ><?cs var:studio.mac_bundle_download ?></a>
334 </td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800335 <td id="mac-bundle-size"><?cs call:size_in_mb(studio.mac_bundle_bytes) ?> MB
336 <br>(<?cs var:studio.mac_bundle_bytes ?> bytes)</td>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700337 <td><?cs var:studio.mac_bundle_checksum ?></td>
338 </tr>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700339 <tr>
340 <td>Linux</td>
341 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800342 <a onclick="return onDownload(this,false,true)" id="linux-bundle" data-modal-toggle="studio_tos"
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700343 href="https://dl.google.com/dl/android/studio/ide-zips/<?cs var:studio.version ?>/<?cs var:studio.linux_bundle_download ?>"
344 ><?cs var:studio.linux_bundle_download ?></a>
345 </td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800346 <td id="linux-bundle-size"><?cs call:size_in_mb(studio.linux_bundle_bytes) ?> MB
347 <br>(<?cs var:studio.linux_bundle_bytes ?> bytes)</td>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700348 <td><?cs var:studio.linux_bundle_checksum ?></td>
349 </tr>
350 </table>
351
352
353
smain@google.com6b2a9862016-04-06 17:21:37 -0700354<h4 class="norule" style="margin-top:40px">Get just the command line tools</h4>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800355
smain@google.com6b2a9862016-04-06 17:21:37 -0700356<p>If you do not need Android Studio, you can download the basic Android
357command line tools below.</p>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800358
359 <table class="download">
360 <tr>
361 <th>Platform</th>
362 <th>SDK tools package</th>
363 <th>Size</th>
364 <th>SHA-1 checksum</th>
365 </tr>
366 <tr>
367 <td rowspan="2">Windows</td>
368 <td>
369 <a onclick="return onDownload(this)" id="win-tools" data-modal-toggle="studio_tos"
370 href="//dl.google.com/android/<?cs
371var:sdk.win_installer
372?>"><?cs var:sdk.win_installer ?></a><br>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800373 </td>
374 <td><?cs call:size_in_mb(sdk.win_installer_bytes) ?> MB
375 <br>(<?cs var:sdk.win_installer_bytes ?> bytes)</td>
376 <td><?cs var:sdk.win_installer_checksum ?></td>
377 </tr>
378 <tr>
379 <!-- blank TD from Windows rowspan -->
380 <td>
381 <a onclick="return onDownload(this)" id="win-tools2" data-modal-toggle="studio_tos"
382 href="//dl.google.com/android/<?cs var:sdk.win_download
383?>"><?cs var:sdk.win_download ?></a><br>
smain@google.com6b2a9862016-04-06 17:21:37 -0700384 No installer
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800385 </td>
386 <td><?cs call:size_in_mb(sdk.win_bytes) ?> MB
387 <br>(<?cs var:sdk.win_bytes ?> bytes)</td>
388 <td><?cs var:sdk.win_checksum ?></td>
389 </tr>
390 <tr>
391 <td><nobr>Mac OS X</nobr></td>
392 <td>
393 <a onclick="return onDownload(this)" id="mac-tools" data-modal-toggle="studio_tos"
394 href="//dl.google.com/android/<?cs
395var:sdk.mac_download
396?>"><?cs var:sdk.mac_download ?></a>
397 </td>
398 <td><?cs call:size_in_mb(sdk.mac_bytes) ?> MB
399 <br>(<?cs var:sdk.mac_bytes ?> bytes)</td>
400 <td><?cs var:sdk.mac_checksum ?></td>
401 </tr>
402 <tr>
403 <td>Linux</td>
404 <td>
405 <a onclick="return onDownload(this)" id="linux-tools" data-modal-toggle="studio_tos"
406 href="//dl.google.com/android/<?cs
407var:sdk.linux_download
408?>"><?cs var:sdk.linux_download ?></a>
409 </td>
410 <td><?cs call:size_in_mb(sdk.linux_bytes) ?> MB
411 <br>(<?cs var:sdk.linux_bytes ?> bytes)</td>
412 <td><?cs var:sdk.linux_checksum ?></td>
413 </tr>
414 </table>
415 <p>
416Also see the <a href="<?cs var:toroot ?>tools/sdk/tools-notes.html">SDK
417tools release notes</a>.</p>
418
419 </div><!-- end wrap -->
420 </section>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800421
422
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800423<?cs ######## The Android Studio version of the download script ######### ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800424<script>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800425 var os;
426 var bundlename;
427 var $toolslink;
428
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700429 if (navigator.appVersion.indexOf("Mobile")!=-1) {
430 // Do nothing for any "mobile" user agent
431 } else if (navigator.appVersion.indexOf("Win")!=-1) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800432 os = "Windows";
433 bundlename = '#win-bundle';
434 $toolslink = $('#win-tools');
435 } else if (navigator.appVersion.indexOf("Mac")!=-1) {
436 os = "Mac";
437 bundlename = '#mac-bundle';
438 $toolslink = $('#mac-tools');
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700439 } else if (navigator.appVersion.indexOf("Linux")!=-1 && navigator.appVersion.indexOf("Android")==-1) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800440 os = "Linux";
441 bundlename = '#linux-bundle';
442 $toolslink = $('#linux-tools');
443 }
444
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700445 if (os != undefined) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800446 $('#not-supported').hide();
447
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700448 /* set up primary Android Studio download button */
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800449 idname = bundlename + "-size";
450 sizeMB = $(idname).text().split(' MB')[0];
451 $('.download-bundle-button > .small').html(" for " + os + " <em>(" + sizeMB + " MB)</em>");
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700452 $('.download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
Dirk Dougherty541b4942014-02-14 18:31:53 -0800453 }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700454
455
Dirk Dougherty541b4942014-02-14 18:31:53 -0800456 function onDownload(link, button, bundle) {
Dirk Doughertye21bed22014-05-02 15:14:04 -0700457
Dirk Dougherty541b4942014-02-14 18:31:53 -0800458 /* set text for download button */
459 if (button) {
460 $("#downloadForRealz").html($(link).text());
461 } else {
462 $("#downloadForRealz").html("Download " + $(link).text());
463 }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700464
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700465 $("#downloadForRealz").attr('bundle', bundle);
Dirk Dougherty0dc81b92015-12-08 14:49:52 -0800466 if (bundle && !button) {
467 $("a#downloadForRealz").attr("name", "#" + $(link).attr('id'));
468 } else {
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800469 $("h2#tos-header").text('Download the Android SDK Tools');
Dirk Dougherty0dc81b92015-12-08 14:49:52 -0800470 $("a#downloadForRealz").attr("name", $(link).attr('href'));
471 }
Dirk Dougherty541b4942014-02-14 18:31:53 -0800472
Dirk Dougherty541b4942014-02-14 18:31:53 -0800473 return false;
474 }
475
476
477 function onAgreeChecked() {
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700478 /* verify that the TOS is agreed */
479 if ($("input#agree").is(":checked")) {
Dirk Doughertye21bed22014-05-02 15:14:04 -0700480
Dirk Dougherty541b4942014-02-14 18:31:53 -0800481 /* if downloading the bundle */
482 if ($("#downloadForRealz").attr('bundle')) {
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700483 /* construct the name of the link we want */
484 linkId = $("a#downloadForRealz").attr("name");
Dirk Dougherty541b4942014-02-14 18:31:53 -0800485 /* set the real url for download */
486 $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700487 } else {
488 $("a#downloadForRealz").attr("href", $("a#downloadForRealz").attr("name"));
Dirk Dougherty541b4942014-02-14 18:31:53 -0800489 }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700490
Dirk Dougherty541b4942014-02-14 18:31:53 -0800491 /* reveal the download button */
492 $("a#downloadForRealz").removeClass('disabled');
493 } else {
494 $("a#downloadForRealz").addClass('disabled');
495 }
496 }
497
498 function onDownloadForRealz(link) {
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700499 if ($("input#agree").is(':checked')) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800500 $("div.sdk-terms").slideUp();
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800501 if ($("#downloadForRealz").attr('bundle') == 'true') {
502 $("h2#tos-header").text('Now downloading Android Studio!');
503 $(".sdk-terms-intro").text('Redirecting to the install instructions...');
504 $("#sdk-terms-form").slideUp(function() {
505 setTimeout(function() {
506 window.location = "/sdk/installing/index.html";
507 }, 2000);
508 });
509 } else {
510 $("h2#tos-header").text('Now downloading the Android SDK Tools!');
511 $(".sdk-terms-intro").html("<p>Because you've chosen to download " +
512 "only the Android SDK tools (and not Android Studio), there are no " +
513 "setup procedures to follow.</p><p>For information about how to " +
514 "keep your SDK tools up to date, refer to the " +
515 "<a href='/tools/help/sdk-manager.html'>SDK Manager</a> guide.</p>");
516 $("#sdk-terms-form").slideUp();
517 }
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700518 ga('send', 'event', 'SDK', 'IDE and Tools', $("#downloadForRealz").html());
Dirk Dougherty541b4942014-02-14 18:31:53 -0800519 return true;
520 } else {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800521 return false;
522 }
523 }
524
525 $(window).hashchange( function(){
526 if (location.hash == "") {
527 location.reload();
528 }
529 });
530
531</script>
532
533
534
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800535
Dirk Dougherty541b4942014-02-14 18:31:53 -0800536<?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
537
538
539
540
541 <?cs else ?> <?cs # end if online ?>
542
543 <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
544 <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
545 Android 3.0 release, to give you a head-start on developing applications for it.
546 </p>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700547
Dirk Dougherty541b4942014-02-14 18:31:53 -0800548 <p>See the <a
549 href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
550 about how to set up the preview SDK and get started.</p>
551 <style type="text/css">
552 .non-preview { display:none; }
553 </style>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700554
Dirk Dougherty541b4942014-02-14 18:31:53 -0800555 <?cs else ?><?cs # it's normal offline docs ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700556
Dirk Dougherty541b4942014-02-14 18:31:53 -0800557 <?cs ######## HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
558 <?cs call:tag_list(root.descr) ?>
559 <style type="text/css">
560 body .offline { display:block; }
561 body .online { display:none; }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700562 </style>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800563 <script>
564 $('.reqs').show();
565 </script>
566 <?cs /if ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700567
Dirk Dougherty541b4942014-02-14 18:31:53 -0800568 <?cs /if ?> <?cs # end if/else online ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700569
Dirk Dougherty541b4942014-02-14 18:31:53 -0800570<?cs /if ?> <?cs # end if/else NDK ?>
571
572<?cs /if ?> <?cs # end if/else redirect ?>
573
574
575</div><!-- end jd-content -->
576
577<?cs if:!sdk.redirect ?>
578<?cs include:"footer.cs" ?>
579<?cs /if ?>
580
581</div><!-- end g-unit -->
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800582
Dirk Dougherty541b4942014-02-14 18:31:53 -0800583<?cs include:"trailer.cs" ?>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800584<script src="https://developer.android.com/ytblogger_lists_unified.js?v=17" type="text/javascript"></script>
585<script src="/jd_lists_unified.js?v=17" type="text/javascript"></script>
586<script src="/jd_extras.js?v=17" type="text/javascript"></script>
587<script src="/jd_collections.js?v=17" type="text/javascript"></script>
588<script src="/jd_tag_helpers.js?v=17" type="text/javascript"></script>
589
Dirk Dougherty541b4942014-02-14 18:31:53 -0800590<!-- Start of Tag -->
591<script type="text/javascript">
592var axel = Math.random() + "";
593var a = axel * 10000000000000;
594document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>');
595</script>
596<noscript>
597<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe>
598</noscript>
599<!-- End of Tag -->
600</body>
601</html>
602
603
604