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