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