sdkpage.cs revision fe4dd5263f344c5420780626410b84d7383e801d
1<?cs include:"doctype.cs" ?>
2<?cs include:"macros.cs" ?>
3<html<?cs if:devsite ?> devsite<?cs /if ?>>
4<?cs if:sdk.redirect ?>
5  <head>
6    <title>Redirecting...</title>
7    <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
8      if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
9      else ?>index.html<?cs /if ?>">
10  </head>
11<?cs else ?>
12  <?cs include:"head_tag.cs" ?>
13<?cs /if ?>
14<body class="gc-documentation
15  <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
16  elif:design ?>design<?cs
17  elif:distribute ?>distribute<?cs
18  /if ?>" itemscope itemtype="http://schema.org/CreativeWork">
19  <a name="top"></a>
20<?cs include:"header.cs" ?>
21
22
23<div <?cs if:fullpage
24?><?cs else
25?>class="col-13" id="doc-col"<?cs /if ?> >
26
27<?cs if:sdk.redirect ?>
28
29<div class="g-unit">
30  <div id="jd-content">
31    <p>Redirecting to
32    <a href="<?cs var:toroot ?>sdk/<?cs
33      if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
34      else ?>index.html<?cs /if ?>"><?cs
35      if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
36      else ?>Download the SDK<?cs /if ?>
37    </a> ...</p>
38
39<?cs else ?>
40<?cs # else, if NOT redirect ...
41#
42#
43# The following is for SDK/NDK pages
44#
45#
46?>
47
48<?cs if:header.hide ?><?cs else ?>
49<h1 itemprop="name"><?cs var:page.title ?></h1>
50<?cs /if ?>
51  <div id="jd-content" itemprop="description">
52
53<?cs if:sdk.not_latest_version ?>
54  <div class="special">
55    <p><strong>This is NOT the current Android SDK release.</strong></p>
56    <p><a href="/sdk/index.html">Download the current Android SDK</a></p>
57  </div>
58<?cs /if ?>
59
60
61<?cs if:ndk ?>
62<?cs #
63#
64#
65#
66#
67#
68#
69# the following is for the NDK
70#
71# (nested in if/else redirect)
72#
73#
74#
75#
76?>
77
78  <table class="download" id="download-table">
79    <tr>
80      <th>Platform</th>
81      <th>Package</th>
82      <th style="white-space:nowrap">Size (Bytes)</th>
83      <th>MD5 Checksum</th>
84  </tr>
85  <tr>
86    <td>Windows 32-bit</td>
87    <td>
88  <a onClick="return onDownload(this)"
89     href="http://dl.google.com/android/ndk/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a>
90    </td>
91    <td><?cs var:ndk.win32_bytes ?></td>
92    <td><?cs var:ndk.win32_checksum ?></td>
93  </tr>
94 <!-- <tr>
95   <td>
96  <a onClick="return onDownload(this)"
97     href="http://dl.google.com/android/ndk/<?cs var:ndk.win32.legacy_download ?>"><?cs var:ndk.win32.legacy_download ?></a>
98    </td>
99    <td><?cs var:ndk.win32.legacy_bytes ?></td>
100    <td><?cs var:ndk.win32.legacy_checksum ?></td>
101  </tr> -->
102  <tr>
103    <td>Windows 64-bit</td>
104    <td>
105  <a onClick="return onDownload(this)"
106     href="http://dl.google.com/android/ndk/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
107    </td>
108    <td><?cs var:ndk.win64_bytes ?></td>
109    <td><?cs var:ndk.win64_checksum ?></td>
110  </tr>
111 <!--  <tr>
112    <td>
113  <a onClick="return onDownload(this)"
114     href="http://dl.google.com/android/ndk/<?cs var:ndk.win64.legacy_download ?>"><?cs var:ndk.win64.legacy_download ?></a>
115    </td>
116    <td><?cs var:ndk.win64.legacy_bytes ?></td>
117    <td><?cs var:ndk.win64.legacy_checksum ?></td>
118  </tr> -->
119  <tr>
120    <td>Mac OS X 32-bit</td>
121    <td>
122  <a onClick="return onDownload(this)"
123     href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
124    </td>
125    <td><?cs var:ndk.mac32_bytes ?></td>
126    <td><?cs var:ndk.mac32_checksum ?></td>
127  </tr>
128 <!--  <tr>
129    <td>
130  <a onClick="return onDownload(this)"
131     href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32.legacy_download ?>"><?cs var:ndk.mac32.legacy_download ?></a>
132    </td>
133    <td><?cs var:ndk.mac32.legacy_bytes ?></td>
134    <td><?cs var:ndk.mac32.legacy_checksum ?></td>
135  </tr> -->
136    <td>Mac OS X 64-bit</td>
137    <td>
138  <a onClick="return onDownload(this)"
139     href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
140    </td>
141    <td><?cs var:ndk.mac64_bytes ?></td>
142    <td><?cs var:ndk.mac64_checksum ?></td>
143  </tr>
144 <!--  <tr>
145    <td>
146  <a onClick="return onDownload(this)"
147     href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64.legacy_download ?>"><?cs var:ndk.mac64.legacy_download ?></a>
148    </td>
149    <td><?cs var:ndk.mac64.legacy_bytes ?></td>
150    <td><?cs var:ndk.mac64.legacy_checksum ?></td>
151  </tr> -->
152  <tr>
153    <td>Linux 32-bit (x86)</td>
154    <td>
155  <a onClick="return onDownload(this)"
156     href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32_download ?>"><?cs var:ndk.linux32_download ?></a>
157    </td>
158    <td><?cs var:ndk.linux32_bytes ?></td>
159    <td><?cs var:ndk.linux32_checksum ?></td>
160  </tr>
161 <!--  <tr>
162    <td>
163  <a onClick="return onDownload(this)"
164     href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32.legacy_download ?>"><?cs var:ndk.linux32.legacy_download ?></a>
165    </td>
166    <td><?cs var:ndk.linux32.legacy_bytes ?></td>
167    <td><?cs var:ndk.linux32.legacy_checksum ?></td>
168  </tr> -->
169  <tr>
170    <td>Linux 64-bit (x86)</td>
171    <td>
172  <a onClick="return onDownload(this)"
173     href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
174    </td>
175    <td><?cs var:ndk.linux64_bytes ?></td>
176    <td><?cs var:ndk.linux64_checksum ?></td>
177  </tr>
178  <!--  <tr>
179    <td>
180  <a onClick="return onDownload(this)"
181     href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64.legacy_download ?>"><?cs var:ndk.linux64.legacy_download ?></a>
182    </td>
183    <td><?cs var:ndk.linux64.legacy_bytes ?></td>
184    <td><?cs var:ndk.linux64.legacy_checksum ?></td>
185  </tr> -->
186
187  </table>
188
189  <?cs ########  HERE IS THE JD DOC CONTENT ######### ?>
190  <?cs call:tag_list(root.descr) ?>
191
192
193
194<script>
195  function onDownload(link) {
196
197    $("#downloadForRealz").html("Download " + $(link).text());
198    $("#downloadForRealz").attr('href',$(link).attr('href'));
199
200    $("#tos").fadeIn('slow');
201
202    location.hash = "download";
203    return false;
204  }
205
206
207  function onAgreeChecked() {
208    if ($("input#agree").is(":checked")) {
209      $("a#downloadForRealz").removeClass('disabled');
210    } else {
211      $("a#downloadForRealz").addClass('disabled');
212    }
213  }
214
215  function onDownloadNdkForRealz(link) {
216    if ($("input#agree").is(':checked')) {
217      $("#tos").fadeOut('slow');
218
219      $('html, body').animate({
220          scrollTop: $("#Installing").offset().top
221        }, 800, function() {
222          $("#Installing").click();
223      });
224
225      return true;
226    } else {
227      $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
228        function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
229      );
230      return false;
231    }
232  }
233
234  $(window).hashchange( function(){
235    if (location.hash == "") {
236      location.reload();
237    }
238  });
239
240</script>
241
242  <?cs else ?>
243<?cs # end if NDK ...
244#
245#
246#
247#
248#
249#
250# the following is for the SDK
251#
252# (nested in if/else redirect and if/else NDK)
253#
254#
255#
256#
257?>
258  <?cs if:android.whichdoc == "online" ?>
259
260
261<?cs ########  HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?>
262<?cs call:tag_list(root.descr) ?>
263
264
265
266
267<h4><a href='' class="expandable"
268  onclick="toggleExpandable(this,'.pax');hideExpandable('.myide,.reqs');return false;"
269  >VIEW ALL DOWNLOADS AND SIZES</a></h4>
270
271
272<div class="pax col-13 online" style="display:none;margin:0;">
273
274
275
276<p class="table-caption"><strong>Android Studio Bundle</strong></p>
277  <table class="download">
278    <tr>
279      <th>Platform</th>
280      <th>Package</th>
281      <th>Size</th>
282      <th>SHA1 Sum</th>
283  </tr>
284  <tr>
285    <td>Windows 32-bit</td>
286    <td>
287  <a onClick="return onDownload(this)" id="win-bundle32"
288     href="https://dl.google.com/android/studio/<?cs var:sdk.win32_bundle_download ?>"><?cs var:studio.win32_bundle_download ?></a>
289    </td>
290    <td><?cs var:studio.win32_bundle_bytes ?> bytes</td>
291    <td><?cs var:studio.win32_bundle_checksum ?></td>
292  </tr>
293  <tr>
294    <td>Windows 64-bit</td>
295    <td>
296  <a onClick="return onDownload(this)" id="win-bundle64"
297     href="https://dl.google.com/android/studio/<?cs var:sdk.win64_bundle_download ?>"><?cs var:studio.win64_bundle_download ?></a>
298    </td>
299    <td><?cs var:studio.win64_bundle_bytes ?> bytes</td>
300    <td><?cs var:studio.win64_bundle_checksum ?></td>
301  </tr>
302  <tr>
303    <td><nobr>Mac OS X 64-bit</nobr></td>
304    <td>
305  <a onClick="return onDownload(this)" id="mac-bundle64"
306     href="https://dl.google.com/android/studio/<?cs var:sdk.mac64_bundle_download ?>"><?cs var:studio.mac64_bundle_download ?></a>
307    </td>
308    <td><?cs var:studio.mac64_bundle_bytes ?> bytes</td>
309    <td><?cs var:studio.mac64_bundle_checksum ?></td>
310  </tr>
311  <tr>
312    <td>Linux 32-bit</td>
313    <td>
314  <a onClick="return onDownload(this)" id="linux-bundle32"
315     href="https://dl.google.com/android/studio/<?cs var:sdk.linux32_bundle_download ?>"><?cs var:studio.linux32_bundle_download ?></a>
316    </td>
317    <td><?cs var:studio.linux32_bundle_bytes ?> bytes</td>
318    <td><?cs var:studio.linux32_bundle_checksum ?></td>
319  </tr>
320  <tr>
321    <td>Linux 64-bit</td>
322    <td>
323  <a onClick="return onDownload(this)" id="linux-bundle64"
324     href="https://dl.google.com/android/studio/<?cs var:sdk.linux64_bundle_download ?>"><?cs var:studio.linux64_bundle_download ?></a>
325    </td>
326    <td><?cs var:studio.linux64_bundle_bytes ?> bytes</td>
327    <td><?cs var:studio.linux64_bundle_checksum ?></td>
328  </tr>
329  </table>
330
331
332
333
334<p class="table-caption"><strong>SDK Tools Only</strong></p>
335  <table class="download">
336    <tr>
337      <th>Platform</th>
338      <th>Package</th>
339      <th>Size</th>
340      <th>MD5 Checksum</th>
341  </tr>
342  <tr>
343    <td rowspan="2">Windows<br>32 &amp; 64-bit</td>
344    <td>
345  <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
346?>"><?cs var:sdk.win_download ?></a>
347    </td>
348    <td><?cs var:sdk.win_bytes ?> bytes</td>
349    <td><?cs var:sdk.win_checksum ?></td>
350  </tr>
351  <tr>
352    <!-- blank TD from Windows rowspan -->
353    <td>
354  <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs
355var:sdk.win_installer
356?>"><?cs var:sdk.win_installer ?></a> (Recommended)
357    </td>
358    <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
359    <td><?cs var:sdk.win_installer_checksum ?></td>
360  </tr>
361  <tr>
362    <td><nobr>Mac OS X</nobr><br>32 &amp; 64-bit</td>
363    <td>
364  <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs
365var:sdk.mac_download
366?>"><?cs var:sdk.mac_download ?></a>
367    </td>
368    <td><?cs var:sdk.mac_bytes ?> bytes</td>
369    <td><?cs var:sdk.mac_checksum ?></td>
370  </tr>
371  <tr>
372    <td>Linux<br>32 &amp; 64-bit</td>
373    <td>
374  <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs
375var:sdk.linux_download
376?>"><?cs var:sdk.linux_download ?></a>
377    </td>
378    <td><?cs var:sdk.linux_bytes ?> bytes</td>
379    <td><?cs var:sdk.linux_checksum ?></td>
380  </tr>
381  </table>
382
383
384<p class="table-caption"><strong>ADT Bundle</strong></p>
385  <table class="download">
386    <tr>
387      <th>Platform</th>
388      <th>Package</th>
389      <th>Size</th>
390      <th>MD5 Checksum</th>
391  </tr>
392  <tr>
393    <td>Windows 32-bit</td>
394    <td>
395  <a onClick="return onDownload(this)" id="win-bundle32"
396     href="https://dl.google.com/android/adt/<?cs var:sdk.win32_bundle_download ?>"><?cs var:sdk.win32_bundle_download ?></a>
397    </td>
398    <td><?cs var:sdk.win32_bundle_bytes ?> bytes</td>
399    <td><?cs var:sdk.win32_bundle_checksum ?></td>
400  </tr>
401  <tr>
402    <td>Windows 64-bit</td>
403    <td>
404  <a onClick="return onDownload(this)" id="win-bundle64"
405     href="https://dl.google.com/android/adt/<?cs var:sdk.win64_bundle_download ?>"><?cs var:sdk.win64_bundle_download ?></a>
406    </td>
407    <td><?cs var:sdk.win64_bundle_bytes ?> bytes</td>
408    <td><?cs var:sdk.win64_bundle_checksum ?></td>
409  </tr>
410  <tr>
411    <td><nobr>Mac OS X 64-bit</nobr></td>
412    <td>
413  <a onClick="return onDownload(this)" id="mac-bundle64"
414     href="https://dl.google.com/android/adt/<?cs var:sdk.mac64_bundle_download ?>"><?cs var:sdk.mac64_bundle_download ?></a>
415    </td>
416    <td><?cs var:sdk.mac64_bundle_bytes ?> bytes</td>
417    <td><?cs var:sdk.mac64_bundle_checksum ?></td>
418  </tr>
419  <tr>
420    <td>Linux 32-bit</td>
421    <td>
422  <a onClick="return onDownload(this)" id="linux-bundle32"
423     href="https://dl.google.com/android/adt/<?cs var:sdk.linux32_bundle_download ?>"><?cs var:sdk.linux32_bundle_download ?></a>
424    </td>
425    <td><?cs var:sdk.linux32_bundle_bytes ?> bytes</td>
426    <td><?cs var:sdk.linux32_bundle_checksum ?></td>
427  </tr>
428  <tr>
429    <td>Linux 64-bit</td>
430    <td>
431  <a onClick="return onDownload(this)" id="linux-bundle64"
432     href="https://dl.google.com/android/adt/<?cs var:sdk.linux64_bundle_download ?>"><?cs var:sdk.linux64_bundle_download ?></a>
433    </td>
434    <td><?cs var:sdk.linux64_bundle_bytes ?> bytes</td>
435    <td><?cs var:sdk.linux64_bundle_checksum ?></td>
436  </tr>
437  </table>
438
439
440
441
442
443
444
445</div><!-- end pax -->
446
447
448
449</div><!-- end col-13 for lower-half content -->
450
451
452
453
454<script>
455  if (location.hash == "#Requirements") {
456    $('.reqs').show();
457  } else if (location.hash == "#ExistingIDE") {
458	 $('.ide').show();
459  }
460
461  var os;
462  var bundlename;
463  var $toolslink;
464
465  if (navigator.appVersion.indexOf("Win")!=-1) {
466    os = "Windows";
467    bundlename = '#win-bundle';
468    $toolslink = $('#win-tools');
469  } else if (navigator.appVersion.indexOf("Mac")!=-1) {
470    os = "Mac";
471    bundlename = '#mac-bundle';
472    $toolslink = $('#mac-tools');
473  } else if (navigator.appVersion.indexOf("Linux")!=-1) {
474    os = "Linux";
475    bundlename = '#linux-bundle';
476    $toolslink = $('#linux-tools');
477  }
478
479  if (os) {
480    $('#not-supported').hide();
481
482    /* set up primary Android Studio download button */
483    $('#download-bundle-button').show();
484    $('#download-bundle-button').append("Download Android Studio <br/><span class='small'>with the Android SDK for " + os + "</span>");
485    $('#download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
486
487    /* set up sdk tools only button */
488    $('#download-tools-button').show();
489    $('#download-tools-button').append("Download the stand-alone Android SDK Tools for " + os);
490    $('#download-tools-button').click(function() {return onDownload(this,true);}).attr('href', $toolslink.attr('href'));
491  } else {
492    $('.pax').show();
493  }
494
495
496  function onDownload(link, button, bundle) {
497
498    /* set text for download button */
499    if (button) {
500      $("#downloadForRealz").html($(link).text());
501    } else {
502      $("#downloadForRealz").html("Download " + $(link).text());
503    }
504
505    /* if it's a bundle, show the 32/64-bit picker */
506    if (bundle) {
507      $("#downloadForRealz").attr('Eclipse ADT Bundle','true');
508      if ($("#downloadForRealz").text().indexOf("Mac") == -1) {
509        $("p#bitpicker").show();
510      } else {
511        /* mac is always 64 bit, so set it checked */
512        $("p#bitpicker input[value=64]").attr('checked', true);
513      }
514      /* save link name until the bit version is chosen */
515      $("#downloadForRealz").attr('name',$(link).attr('href'));
516    } else {
517      /* if not using bundle, set download button to ignore bitpicker and set url */
518      $("#downloadForRealz").attr('bundle','false');
519      $("#downloadForRealz").attr('href',$(link).attr('href'));
520      /* set picker checked as a fake default */
521      $("p#bitpicker input[value=64]").attr('checked', true);
522      $("a#next-link").html("Setting Up an Existing IDE").attr('href',toRoot + 'sdk/installing/index.html');
523    }
524
525    $("#tos").fadeIn('fast');
526    $("#landing").fadeOut('fast');
527
528    location.hash = "download";
529    return false;
530  }
531
532
533  function onAgreeChecked() {
534    /* verify that the TOS is agreed and a bit version is chosen */
535    if ($("input#agree").is(":checked") && $("#bitpicker input:checked").length) {
536
537      /* if downloading the bundle */
538      if ($("#downloadForRealz").attr('bundle')) {
539        /* construct the name of the link we want based on the bit version */
540        linkId = $("a#downloadForRealz").attr("name") + $("#bitpicker input:checked").val();
541        /* set the real url for download */
542        $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
543      }
544
545      /* reveal the download button */
546      $("a#downloadForRealz").removeClass('disabled');
547    } else {
548      $("a#downloadForRealz").addClass('disabled');
549    }
550  }
551
552  function onDownloadForRealz(link) {
553    if ($("input#agree").is(':checked') && $("#bitpicker input:checked").length) {
554      $("div.sdk-terms").slideUp();
555      $("h1#tos-header").text('Now redirecting to the install instructions...');
556      $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow', function() {
557        setTimeout(function() {
558          if ($("#downloadForRealz").attr('bundle') == 'true') {
559            // User downloaded the ADT Bundle
560            window.location = "/sdk/installing/index.html?pkg=adt";
561          } else {
562            // User downloaded the SDK Tools
563            window.location = "/sdk/installing/index.html?pkg=tools";
564          }
565        }, 500);
566      });
567      ga('send', 'event', 'SDK', 'IDE and Tools', $("#downloadForRealz").html());
568      return true;
569    } else {
570      $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,
571        function() {$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#222"}, 200)}
572      );
573      return false;
574    }
575  }
576
577  $(window).hashchange( function(){
578    if (location.hash == "") {
579      location.reload();
580    }
581  });
582
583</script>
584
585
586
587</div><!-- end the wrapper used for relative/absolute positions  -->
588<?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
589
590
591
592
593  <?cs else ?> <?cs # end if online ?>
594
595    <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
596      <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
597    Android 3.0 release, to give you a head-start on developing applications for it.
598    </p>
599
600      <p>See the <a
601    href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
602    about how to set up the preview SDK and get started.</p>
603    <style type="text/css">
604    .non-preview { display:none; }
605    </style>
606
607    <?cs else ?><?cs # it's normal offline docs ?>
608
609      <?cs ########  HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
610      <?cs call:tag_list(root.descr) ?>
611      <style type="text/css">
612        body .offline { display:block; }
613        body .online { display:none; }
614      </style>
615      <script>
616        $('.reqs').show();
617      </script>
618    <?cs /if ?>
619
620  <?cs /if ?> <?cs # end if/else online ?>
621
622<?cs /if ?> <?cs # end if/else NDK ?>
623
624<?cs /if ?> <?cs # end if/else redirect ?>
625
626
627</div><!-- end jd-content -->
628
629<?cs if:!sdk.redirect ?>
630<?cs include:"footer.cs" ?>
631<?cs /if ?>
632
633</div><!-- end g-unit -->
634
635<?cs include:"trailer.cs" ?>
636
637<!-- Start of Tag -->
638<script type="text/javascript">
639var axel = Math.random() + "";
640var a = axel * 10000000000000;
641document.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>');
642</script>
643<noscript>
644<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>
645</noscript>
646<!-- End of Tag -->
647</body>
648</html>
649
650
651
652