sdkpage.cs revision f97b2ef21a9940ec7a41c9116a79f9b2a36e0c1d
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<div class="pax col-13 online" style="margin:0;">
268
269
270<h3>SDK Tools Only</h3>
271
272<p>If you prefer to use a different IDE or run the tools from the
273command line or with build scripts, you can instead download the stand-alone Android SDK Tools.
274These packages provide the basic SDK tools for app development, without an IDE.
275Also see the <a href="<?cs var:toroot ?>tools/sdk/tools-notes.html">SDK tools release notes</a>.</p>
276
277  <table class="download">
278    <tr>
279      <th>Platform</th>
280      <th>Package</th>
281      <th>Size</th>
282      <th>SHA-1 Checksum</th>
283  </tr>
284  <tr>
285    <td rowspan="2">Windows</td>
286    <td>
287  <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs
288var:sdk.win_installer
289?>"><?cs var:sdk.win_installer ?></a> (Recommended)
290    </td>
291    <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
292    <td><?cs var:sdk.win_installer_checksum ?></td>
293  </tr>
294  <tr>
295    <!-- blank TD from Windows rowspan -->
296    <td>
297  <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
298?>"><?cs var:sdk.win_download ?></a>
299    </td>
300    <td><?cs var:sdk.win_bytes ?> bytes</td>
301    <td><?cs var:sdk.win_checksum ?></td>
302  </tr>
303  <tr>
304    <td><nobr>Mac OS X</nobr></td>
305    <td>
306  <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs
307var:sdk.mac_download
308?>"><?cs var:sdk.mac_download ?></a>
309    </td>
310    <td><?cs var:sdk.mac_bytes ?> bytes</td>
311    <td><?cs var:sdk.mac_checksum ?></td>
312  </tr>
313  <tr>
314    <td>Linux</td>
315    <td>
316  <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs
317var:sdk.linux_download
318?>"><?cs var:sdk.linux_download ?></a>
319    </td>
320    <td><?cs var:sdk.linux_bytes ?> bytes</td>
321    <td><?cs var:sdk.linux_checksum ?></td>
322  </tr>
323  </table>
324
325
326
327<h3>All Android Studio Packages</h3>
328
329<p>Select a specific Android Studio package for your platform. Also see the
330<a href="<?cs var:toroot ?>tools/revisions/studio.html">Android Studio release notes</a>.</p>
331
332  <table class="download">
333    <tr>
334      <th>Platform</th>
335      <th>Package</th>
336      <th>Size</th>
337      <th>SHA-1 Checksum</th>
338  </tr>
339
340  <tr>
341    <td rowspan="3">Windows</td>
342    <td>
343  <a onclick="return onDownload(this)" id="win-bundle"
344    href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_bundle_exe_download ?>"
345    ><?cs var:studio.win_bundle_exe_download ?></a><br>(Recommended)
346    </td>
347    <td><?cs var:studio.win_bundle_exe_bytes ?> bytes</td>
348    <td><?cs var:studio.win_bundle_exe_checksum ?></td>
349  </tr>
350
351  <tr>
352    <!-- blank TD from Windows rowspan -->
353    <td>
354  <a onclick="return onDownload(this)"
355    href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_notools_exe_download ?>"
356    ><?cs var:studio.win_notools_exe_download ?></a><br>(No SDK tools included)
357    </td>
358    <td><?cs var:studio.win_notools_exe_bytes ?> bytes</td>
359    <td><?cs var:studio.win_notools_exe_checksum ?></td>
360  </tr>
361
362  <tr>
363    <!-- blank TD from Windows rowspan -->
364    <td>
365  <a onclick="return onDownload(this)"
366    href="https://dl.google.com/dl/android/studio/ide-zips/<?cs var:studio.version ?>/<?cs var:studio.win_bundle_download ?>"
367    ><?cs var:studio.win_bundle_download ?></a>
368    </td>
369    <td><?cs var:studio.win_bundle_bytes ?> bytes</td>
370    <td><?cs var:studio.win_bundle_checksum ?></td>
371  </tr>
372
373  <tr>
374    <td><nobr>Mac OS X</nobr></td>
375    <td>
376  <a onclick="return onDownload(this)" id="mac-bundle"
377    href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.mac_bundle_download ?>"
378    ><?cs var:studio.mac_bundle_download ?></a>
379    </td>
380    <td><?cs var:studio.mac_bundle_bytes ?> bytes</td>
381    <td><?cs var:studio.mac_bundle_checksum ?></td>
382  </tr>
383
384  <tr>
385    <td>Linux</td>
386    <td>
387  <a onclick="return onDownload(this)" id="linux-bundle"
388    href="https://dl.google.com/dl/android/studio/ide-zips/<?cs var:studio.version ?>/<?cs var:studio.linux_bundle_download ?>"
389    ><?cs var:studio.linux_bundle_download ?></a>
390    </td>
391    <td><?cs var:studio.linux_bundle_bytes ?> bytes</td>
392    <td><?cs var:studio.linux_bundle_checksum ?></td>
393  </tr>
394  </table>
395
396
397
398</div><!-- end pax -->
399
400
401
402
403
404<script>
405  if (location.hash == "#Requirements") {
406    $('.reqs').show();
407  } else if (location.hash == "#ExistingIDE") {
408	 $('.ide').show();
409  }
410
411  var os;
412  var bundlename;
413  var $toolslink;
414
415  if (navigator.appVersion.indexOf("Mobile")!=-1) {
416    // Do nothing for any "mobile" user agent
417  } else if (navigator.appVersion.indexOf("Win")!=-1) {
418    os = "Windows";
419    bundlename = '#win-bundle';
420    $toolslink = $('#win-tools');
421  } else if (navigator.appVersion.indexOf("Mac")!=-1) {
422    os = "Mac";
423    bundlename = '#mac-bundle';
424    $toolslink = $('#mac-tools');
425  } else if (navigator.appVersion.indexOf("Linux")!=-1 && navigator.appVersion.indexOf("Android")==-1) {
426    os = "Linux";
427    bundlename = '#linux-bundle';
428    $toolslink = $('#linux-tools');
429  }
430
431  if (os != undefined) {
432    $('#not-supported').hide();
433
434    /* set up primary Android Studio download button */
435    $('.download-bundle-button').append(" <br/><span class='small'>for " + os + "</span>");
436    $('.download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
437  }
438
439
440  function onDownload(link, button, bundle) {
441
442    /* set text for download button */
443    if (button) {
444      $("#downloadForRealz").html($(link).text());
445    } else {
446      $("#downloadForRealz").html("Download " + $(link).text());
447    }
448
449    $("#downloadForRealz").attr('bundle', bundle);
450    $("a#downloadForRealz").attr("name", $(link).attr('href'));
451
452    $("#tos").show();
453    $("#landing").hide();
454
455    location.hash = "top";
456    return false;
457  }
458
459
460  function onAgreeChecked() {
461    /* verify that the TOS is agreed */
462    if ($("input#agree").is(":checked")) {
463
464      /* if downloading the bundle */
465      if ($("#downloadForRealz").attr('bundle')) {
466        /* construct the name of the link we want */
467        linkId = $("a#downloadForRealz").attr("name");
468        /* set the real url for download */
469        $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
470      } else {
471        $("a#downloadForRealz").attr("href", $("a#downloadForRealz").attr("name"));
472      }
473
474      /* reveal the download button */
475      $("a#downloadForRealz").removeClass('disabled');
476    } else {
477      $("a#downloadForRealz").addClass('disabled');
478    }
479  }
480
481  function onDownloadForRealz(link) {
482    if ($("input#agree").is(':checked')) {
483      location.hash = "";
484      location.hash = "top";
485      $("div.sdk-terms").slideUp();
486      $("h1#tos-header").text('Now downloading...');
487      $(".sdk-terms-intro").text('You\'ll be redirected to the install instructions in a moment.');
488      $("#sdk-terms-form").fadeOut('slow', function() {
489        setTimeout(function() {
490          if ($("#downloadForRealz").attr('bundle') == 'true') {
491            // User downloaded the studio Bundle
492            window.location = "/sdk/installing/index.html?pkg=studio";
493          } else {
494            // User downloaded the SDK Tools
495            window.location = "/sdk/installing/index.html?pkg=tools";
496          }
497        }, 3000);
498      });
499      ga('send', 'event', 'SDK', 'IDE and Tools', $("#downloadForRealz").html());
500      return true;
501    } else {
502      $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
503        function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
504      );
505      return false;
506    }
507  }
508
509  $(window).hashchange( function(){
510    if (location.hash == "") {
511      location.reload();
512    }
513  });
514
515</script>
516
517
518
519</div><!-- end the wrapper used for relative/absolute positions  -->
520<?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
521
522
523
524
525  <?cs else ?> <?cs # end if online ?>
526
527    <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
528      <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
529    Android 3.0 release, to give you a head-start on developing applications for it.
530    </p>
531
532      <p>See the <a
533    href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
534    about how to set up the preview SDK and get started.</p>
535    <style type="text/css">
536    .non-preview { display:none; }
537    </style>
538
539    <?cs else ?><?cs # it's normal offline docs ?>
540
541      <?cs ########  HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
542      <?cs call:tag_list(root.descr) ?>
543      <style type="text/css">
544        body .offline { display:block; }
545        body .online { display:none; }
546      </style>
547      <script>
548        $('.reqs').show();
549      </script>
550    <?cs /if ?>
551
552  <?cs /if ?> <?cs # end if/else online ?>
553
554<?cs /if ?> <?cs # end if/else NDK ?>
555
556<?cs /if ?> <?cs # end if/else redirect ?>
557
558
559</div><!-- end jd-content -->
560
561<?cs if:!sdk.redirect ?>
562<?cs include:"footer.cs" ?>
563<?cs /if ?>
564
565</div><!-- end g-unit -->
566
567<?cs include:"trailer.cs" ?>
568
569<!-- Start of Tag -->
570<script type="text/javascript">
571var axel = Math.random() + "";
572var a = axel * 10000000000000;
573document.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>');
574</script>
575<noscript>
576<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>
577</noscript>
578<!-- End of Tag -->
579</body>
580</html>
581
582
583
584