Android SDK 安装方法官网原文Word下载.docx

上传人:b****3 文档编号:17561992 上传时间:2022-12-07 格式:DOCX 页数:14 大小:136.23KB
下载 相关 举报
Android SDK 安装方法官网原文Word下载.docx_第1页
第1页 / 共14页
Android SDK 安装方法官网原文Word下载.docx_第2页
第2页 / 共14页
Android SDK 安装方法官网原文Word下载.docx_第3页
第3页 / 共14页
Android SDK 安装方法官网原文Word下载.docx_第4页
第4页 / 共14页
Android SDK 安装方法官网原文Word下载.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

Android SDK 安装方法官网原文Word下载.docx

《Android SDK 安装方法官网原文Word下载.docx》由会员分享,可在线阅读,更多相关《Android SDK 安装方法官网原文Word下载.docx(14页珍藏版)》请在冰豆网上搜索。

Android SDK 安装方法官网原文Word下载.docx

5.5.ExploringtheSDK(Optional)

6.NextSteps

7.Troubleshooting

Seealso

1.ADTPluginforEclipse

2.AddingSDKComponents

ThispagedescribeshowtoinstalltheAndroidSDKandsetupyourdevelopmentenvironmentforthefirsttime.

Ifyouencounteranyproblemsduringinstallation,seetheTroubleshootingsectionatthebottomofthispage.

Updating?

IfyoualreadyhaveanAndroidSDK,usetheAndroidSDKandAVDManagertooltoinstallupdatedtoolsandnewAndroidplatformsintoyourexistingenvironment.Forinformationabouthowtodothat,seeAddingSDKComponents

Step1.PreparingYourDevelopmentComputer

BeforegettingstartedwiththeAndroidSDK,takeamomenttoconfirmthatyourdevelopmentcomputermeetstheSystemRequirements.Inparticular,youmightneedtoinstalltheJDK,ifyoudon'

thaveitalready.

IfyouwillbedevelopinginEclipsewiththeAndroidDevelopmentTools(ADT)Plugin—therecommendedpathifyouarenewtoAndroid—makesurethatyouhaveasuitableversionofEclipseinstalledonyourcomputer(3.4ornewerisrecommended).IfyouneedtoinstallEclipse,youcandownloaditfromthislocation:

http:

//www.eclipse.org/downloads/

ForEclipse3.5ornewer,the"

EclipseClassic"

versionisrecommended.Otherwise,aJavaorRCPversionofEclipseisrecommended.

Step2.DownloadingtheSDKStarterPackage

TheSDKstarterpackageisnotafulldevelopmentenvironment—itincludesonlythecoreSDKTools,whichyoucanusetodownloadtherestoftheSDKcomponents(suchasthelatestAndroidplatform).

Ifyouhaven'

talready,getthelatestversionoftheSDKstarterpackagefromtheSDKdownloadpage.

Ifyoudownloadeda.zipor.tgzpackage(insteadoftheSDKinstaller),unpackittoasafelocationonyourmachine.Bydefault,theSDKfilesareunpackedintoadirectorynamedandroid-sdk-<

machine-platform>

.

IfyoudownloadedtheWindowsinstaller(.exefile),runitnowanditwillcheckwhethertheproperJavaSEDevelopmentKit(JDK)isinstalled(installingit,ifnecessary),theninstalltheSDKToolsintoadefaultlocation(whichyoucanmodify).

MakeanoteofthenameandlocationoftheSDKdirectoryonyoursystem—youwillneedtorefertotheSDKdirectorylater,whensettinguptheADTpluginandwhenusingtheSDKtoolsfromcommandline.

Step3.InstallingtheADTPluginforEclipse

AndroidoffersacustompluginfortheEclipseIDE,calledAndroidDevelopmentTools(ADT),thatisdesignedtogiveyouapowerful,integratedenvironmentinwhichtobuildAndroidapplications.ItextendsthecapabilitesofEclipsetoletyouquicklysetupnewAndroidprojects,createanapplicationUI,debugyourapplicationsusingtheAndroidSDKtools,andevenexportsigned(orunsigned)APKsinordertodistributeyourapplication.Ingeneral,developinginEclipsewithADTisahighlyrecommendedapproachandisthefastestwaytogetstartedwithAndroid.

Ifyou'

dliketouseADTfordevelopingAndroidapplications,installitnow.ReadInstallingtheADTPluginforstep-by-stepinstallationinstructions,thenreturnheretocontinuethelaststepinsettingupyourAndroidSDK.

IfyouprefertoworkinadifferentIDE,youdonotneedtoinstallEclipseorADT,instead,youcandirectlyusetheSDKtoolstobuildanddebugyourapplication.ThedeveloperguidehasmoreinformationaboutDevelopinginOtherIDEs.

Step4.AddingPlatformsandOtherComponents

ThelaststepinsettingupyourSDKisusingtheAndroidSDKandAVDManager(atoolincludedintheSDKstarterpackage)todownloadessentialSDKcomponentsintoyourdevelopmentenvironment.

TheSDKusesamodularstructurethatseparatesthemajorpartsoftheSDK—Androidplatformversions,add-ons,tools,samples,anddocumentation—intoasetofseparatelyinstallablecomponents.TheSDKstarterpackage,whichyou'

vealreadydownloaded,includesonlyasinglecomponent:

thelatestversionoftheSDKTools.TodevelopanAndroidapplication,youalsoneedtodownloadatleastoneAndroidplatformandtheSDKPlatform-tools(toolsthatthelatestplatformdependupon).However,downloadingadditionalcomponentsishighlyrecommended.

IfyouusedtheWindowsinstaller,whenyoucompletetheinstallationwizard,itwilllaunchtheAndroidSDKandAVDManagerwithadefaultsetofplatformsandothercomponentsselectedforyoutoinstall.SimplyclickInstalltoaccepttherecommendedsetofcomponentsandinstallthem.YoucanthenskiptoStep5,butwerecommendyoufirstreadthesectionabouttheAvailableComponentstobetterunderstandthecomponentsavailablefromtheAndroidSDKandAVDManager.

YoucanlaunchtheAndroidSDKandAVDManagerinoneofthefollowingways:

∙FromwithinEclipse,selectWindow>

AndroidSDKandAVDManager.

∙OnWindows,double-clicktheSDKManager.extfileattherootoftheAndroidSDKdirectory.

∙OnMacorLinux,openaterminalandnavigatetothetools/directoryintheAndroidSDK,thenexecute:

android

Todownloadcomponents,usethegraphicalUIoftheAndroidSDKandAVDManager,showninFigure1,tobrowsetheSDKrepositoryandselectneworupdatedcomponents.TheAndroidSDKandAVDManagerwillinstalltheselectedcomponentsinyourSDKenvironment.Forinformationaboutwhichcomponentsyoushoulddownload,seethefollowingsectionaboutRecommendedComponents.

Figure1.TheAndroidSDKandAVDManager'

sAvailablePackagespanel,whichshowstheSDKcomponentsthatareavailableforyoutodownloadintoyourenvironment.

AvailableComponents

Bydefault,therearetworepositoriesofcomponentsforyourSDK:

AndroidRepositoryandThirdpartyAdd-ons.

TheAndroidRepositoryoffersthesetypesofcomponents:

∙SDKTools(pre-installedintheAndroidSDKstarterpackage)—Containstoolsfordebuggingandtestingyourapplicationandotherutilitytools.Youcanaccesstheseinthe<

sdk>

/tools/directoryofyourSDKandreadmoreaboutthemintheToolssectionofthedeveloperguide.

∙SDKPlatform-tools—Containstoolsthatarerequiredtodevelopanddebugyourapplication,butwhicharedevelopedalongsidetheAndroidplatforminordertosupportthelatestfeatures.Thesetoolsaretypicallyupdatedonlywhenanewplatformbecomesavailable.Youcanaccesstheseinthe<

/platform-tools/directory.ReadmoreaboutthemintheToolssectionofthedeveloperguide.

∙Androidplatforms—AnSDKplatformisavailableforeveryproductionAndroidplatformdeployabletoAndroid-powereddevices.EachplatformcomponentincludesafullycompliantAndroidlibraryandsystemimage,samplecode,emulatorskins,andanyversionspecifictools.Fordetailedinformationabouteachplatform,seetheoverviewdocumentsavailableunderthesection"

DownloadableSDKComponents,"

atleft.

∙USBDriverforWindows(Windowsonly)—ContainsdriverfilesthatyoucaninstallonyourWindowscomputer,sothatyoucanrunanddebugyourapplicationsonanactualdevice.YoudonotneedtheUSBdriverunlessyouplantodebugyourapplicationonanactualAndroid-powereddevice.IfyoudeveloponMacOSXorLinux,youdonotneedaspecialdrivertodebugyourapplicationonanAndroid-powereddevice.(SeeDevelopingonaDeviceformoreinformationaboutdevelopingonarealdevice.)

∙Samples—ContainsthesamplecodeandappsavailableforeachAndroiddevelopmentplatform.IfyouarejustgettingstartedwithAndroiddevelopment,makesuretodownloadthesamplestoyourSDK.

∙Documentation—ContainsalocalcopyofthelatestmultiversiondocumentationfortheAndroidframeworkAPI.

TheThirdpartyAdd-onsprovidecomponentsthatallowyoutocreateadevelopmentenvironmentusingaspecificAndroidexternallibrary(suchastheGoogleMapslibrary)oracustomized(butfullycompliant)Androidsystemimage.YoucanaddadditionalAdd-onrepositories,byclickingAddAdd-onSite.

RecommendedComponents

TheSDKrepositorycontainsarangeofcomponentsthatyoucandownload.Usethetablebelowtodeterminewhichcomponentsyouneed,basedonwhetheryouwanttosetupabasic,recommended,orfulldevelopmentenvironment:

Environment

SDK 

Component

Comments

Basic

SDKTools

vejustinstalledtheSDKstarterpackage,thenyoualreadyhavethelatestversionofthiscomponent.TheSDKToolscomponentisrequiredtodevelopanAndroidapplication.Makesureyoukeepthisuptodate.

SDKPlatform-tools

Thisincludesmoretoolsthatarerequiredforapplicationdevelopment.Thesetoolsareplatform-dependentandtypicallyupdateonlywhenanewSDKplatformismadeavailable,inordertosupportnewfeaturesintheplatform.Thesetoolsarealwaysbackwardcompatiblewitholderplatforms,butyoumustbesurethatyouhavethelatestversionofthesetoolswhenyouinstallanewSDKplatform.

SDKplatform

Youneedtodownloadatleastoneplatformintoyourenvironment,sothatyouwillbeabletocompileyourapplicationandsetupanAndroidVirtualDevice(AVD)toruniton(intheemulator).Tostartwith,justdownloadthelatestversionoftheplatform.Later,ifyouplantopublishyourapplication,youwillwanttodownloadotherplatformsaswell,sothatyoucantestyourapplicationonthefullrangeofAndroidplatformversionsthatyourapplicationsupports.

+

Recommended

(plusBasic)

Documentation

TheDocumentationcomponentisusefulbecauseitletsyouworkofflineandalsolookupAPIreferenceinformationfrominsideEclipse.

Samples

TheSamplescomponentsgiveyousourc

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 其它课程

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1