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