Sunteți pe pagina 1din 4

ADTPluginforEclipse|AndroidDevelopers

http://developer.android.com/sdk/eclipseadt.html

ADTPluginforEclipse
AndroidDevelopmentTools(ADT)isapluginfortheEclipse IDEthatisdesignedtogiveyouapowerful,integrated environmentinwhichtobuildAndroidapplications. ADTextendsthecapabilitiesofEclipsetoletyouquicklysetup newAndroidprojects,createanapplicationUI,addcomponents basedontheAndroidFrameworkAPI,debugyourapplications usingtheAndroidSDKtools,andevenexportsigned(or unsigned).apkfilesinordertodistributeyourapplication.

Inthisdocument Revisions InstallingtheADTPlugin PreparingforInstallation DownloadingtheADTPlugin ConfiguringtheADTPlugin Troubleshooting UpdatingtheADTPlugin

DevelopinginEclipsewithADTishighlyrecommendedandisthefastestwaytogetstarted.Withtheguidedprojectsetup itprovides,aswellastoolsintegration,customXMLeditors,anddebugouputpane,ADTgivesyouanincredibleboostin developingAndroidapplications. ThisdocumentprovidesstepbystepinstructionsonhowtodownloadtheADTpluginandinstallitintoyourEclipse developmentenvironment.NotethatbeforeyoucaninstalloruseADT,youmusthavecompatibleversionsofboththe EclipseIDEandtheAndroidSDKinstalled.Fordetails,makesuretoreadInstallingtheADTPlugin,below. IfyouarealreadyusingADT,thisdocumentalsoprovidesinstructionsonhowtoupdateADTtothelatestversionorhowto uninstallit,ifnecessary.

Revisions
ThesectionsbelowprovidenotesaboutsuccessivereleasesoftheADTPlugin,asdenotedbyrevisionnumber. ADT10.0.1(March2011) Dependencies: ADT10.0.1isdesignedforusewithSDKToolsr10.Ifyouhaven'talreadyinstalledSDKToolsr10intoyour SDK,usetheAndroidSDKandAVDManagertodoso. Generalnotes: Temporaryworkaroundtoresolvetherarecasesinwhichthelayouteditorwillnotopen. FixissueinwhichADT10.0.0wouldinstallonEclipse3.4andlower,eventhoughADTrequiresEclipse 3.5orhigher(asof10.0.0). ADT10.0.0(February2011) ADT9.0.0(January2011) ADT8.0.1(December2010) ADT8.0.0(December2010) ADT0.9.9(September2010) ADT0.9.8(September2010) ADT0.9.7(May2010)

1of4

5/27/20117:23AM

ADTPluginforEclipse|AndroidDevelopers

http://developer.android.com/sdk/eclipseadt.html

ADT0.9.6(March2010) ADT0.9.5(December2009) ADT0.9.4(October2009)

InstallingtheADTPlugin
ThesectionsbelowprovideinstructionsonhowtodownloadandinstallADTintoyourEclipseenvironment.Ifyouencounter problems,seetheTroubleshootingsection.

PreparingYourDevelopmentComputer
ADTisapluginfortheEclipseIDE.BeforeyoucaninstalloruseADT,youmusthaveacompatibleversionofEclipse installedonyourdevelopmentcomputer.ChecktheSystemRequirementsdocumentforalistofEclipseversionsthatare compatiblewiththeAndroidSDK. IfEclipseisalreadyinstalledonyourcomputer,makesurethatitisaversionthatiscompatiblewithADTandthe AndroidSDK. IfyouneedtoinstallorupdateEclipse,youcandownloaditfromthislocation: http://www.eclipse.org/downloads/ The"EclipseClassic"versionisrecommended.Otherwise,aJavaorRCPversionofEclipseisrecommended. Additionally,beforeyoucanconfigureoruseADT,youmustinstalltheAndroidSDKstarterpackage,asdescribedin DownloadingtheSDKStarterPackage.Specifically,youneedtoinstallacompatibleversionoftheAndroidSDKToolsand atleastonedevelopmentplatform.TosimplifyADTsetup,werecommendinstallingtheAndroidSDKpriortoinstalling ADT. WhenyourEclipseandAndroidSDKenvironmentsareready,continuewiththeADTinstallationasdescribedinthesteps below.

DownloadingtheADTPlugin
UsetheUpdateManagerfeatureofyourEclipseinstallationtoinstallthelatestrevisionofADTonyourdevelopment computer.<> AssumingthatyouhaveacompatibleversionoftheEclipseIDEinstalled,asdescribedin PreparingforInstallation,above, followthesestepstodownloadtheADTpluginandinstallitinyourEclipseenvironment. 1. StartEclipse,thenselectHelp>InstallNewSoftware.... 2. ClickAdd,inthetoprightcorner. 3. IntheAddRepositorydialogthatappears,enter"ADTPlugin"fortheNameandthefollowingURLfortheLocation: https://dlssl.google.com/android/eclipse/ 4. ClickOK Note:Ifyouhavetroubleacquiringtheplugin,tryusing"http"intheLocationURL,insteadof"https"(httpsispreferred forsecurityreasons). 5. IntheAvailableSoftwaredialog,selectthecheckboxnexttoDeveloperToolsandclickNext. 6. Inthenextwindow,you'llseealistofthetoolstobedownloaded.ClickNext. 7. Readandacceptthelicenseagreements,thenclickFinish.

2of4

5/27/20117:23AM

ADTPluginforEclipse|AndroidDevelopers

http://developer.android.com/sdk/eclipseadt.html

Note:Ifyougetasecuritywarningsayingthattheauthenticityorvalidityofthesoftwarecan'tbeestablished,clickOK. 8. Whentheinstallationcompletes,restartEclipse.

ConfiguringtheADTPlugin
Afteryou'vesuccessfullydownloadedtheADTasdescribedabove,thenextstepistomodifyyourADTpreferencesin EclipsetopointtotheAndroidSDKdirectory: 1. SelectWindow>Preferences...toopenthePreferencespanel(MacOSX:Eclipse>Preferences). 2. SelectAndroidfromtheleftpanel. YoumayseeadialogaskingwhetheryouwanttosendusagestatisticstoGoogle.Ifso,makeyourchoiceandclick Proceed.YoucannotcontinuewiththisprocedureuntilyouclickProceed. 3. FortheSDKLocationinthemainpanel,clickBrowse...andlocateyourdownloadedSDKdirectory. 4. ClickApply,then OK. Done!Ifyouhaven'tencounteredanyproblems,thentheinstallationiscomplete.Ifyou'reinstallingtheAndroidSDKforthe firsttime,returntoInstallingtheSDKtocompleteyoursetup.

TroubleshootingADTInstallation
IfyouarehavingtroubledownloadingtheADTpluginafterfollowingthestepsabove,herearesomesuggestions: IfEclipsecannotfindtheremoteupdatesitecontainingtheADTplugin,trychangingtheremotesiteURLtousehttp, ratherthanhttps.Thatis,settheLocationfortheremotesiteto: http://dlssl.google.com/android/eclipse/ Ifyouarebehindafirewall(suchasacorporatefirewall),makesurethatyouhaveproperlyconfiguredyourproxy settingsinEclipse.InEclipse,youcanconfigureproxyinformationfromthemainEclipsemenuin Window(onMacOS X,Eclipse)>Preferences>General>NetworkConnections. IfyouarestillunabletouseEclipsetodownloadtheADTpluginasaremoteupdatesite,youcandownloadtheADTzip filetoyourlocalmachineandmanuallyinstallit: 1. DownloadthecurrentADTPluginzipfilefromthetablebelow(donotunpackit). Name Package Size MD5Checksum

ADT10.0.1 ADT10.0.1.zip 5096182bytes e26a77db08377bdd2e62edeb9a3e3701

2. Followsteps1and2inthedefaultinstallinstructions(above). 3. IntheAddSitedialog,clickArchive. 4. Browseandselectthedownloadedzipfile. 5. Enteranameforthelocalupdatesite(e.g.,"AndroidPlugin")inthe"Name"field. 6. ClickOK. 7. Followtheremainingproceduresaslistedfordefaultinstallation above,startingfromstep4. Toupdateyourpluginonceyou'veinstalledusingthezipfile,youwillhavetofollowthesestepsagaininsteadofthedefault updateinstructions.

Otherinstallerrors

3of4

5/27/20117:23AM

ADTPluginforEclipse|AndroidDevelopers

http://developer.android.com/sdk/eclipseadt.html

NotethattherearefeaturesofADTthatrequiresomeoptionalEclipsecomponents(forexample,WST).Ifyouencounter anerrorwheninstallingADT,yourEclipseinstallionmightnotincludethesecomponents.Forinformationabouthowto quicklyaddthenecessarycomponentstoyourEclipseinstallation,seethetroubleshootingtopicADTInstallationError: "requirespluginorg.eclipse.wst.sse.ui".

ForLinuxusers
IfyouencounterthiserrorwheninstallingtheADTPluginforEclipse: Anerroroccurredduringprovisioning. Cannotconnecttokeystore. JKS ...thenyourdevelopmentmachinelacksasuitableJavaVM.InstallingSunJava6willresolvethisissueandyoucanthen reinstalltheADTPlugin.

UpdatingtheADTPlugin
Fromtimetotime,anewrevisionoftheADTPluginbecomesavailable,withnewfeaturesandbugfixes.Generally,whena newrevisionofADTisavailable,youshouldupdatetoitassoonasconvenient. Insomecases,anewrevisionofADTwillhaveadependencyonaspecificrevisionoftheAndroidSDKTools.Ifsuch dependenciesexist,youwillneedtoupdatetheSDKToolscomponentoftheSDKafterinstallingthenewrevisionofADT. ToupdatetheSDKToolscomponent,usetheAndroidSDKandAVDManager,asdescribedinAddingSDKComponents. TolearnaboutnewfeaturesofeachADTrevisionandalsoanydependenciesontheSDKTools,seethelistingsinthe Revisionssection.Todeterminetheversioncurrentlyinstalled,opentheEclipseInstalledSoftwarewindowusingHelp> SoftwareUpdatesandrefertotheversionlistedfor"AndroidDevelopmentTools". Followthestepsbelowtocheckwhetheranupdateisavailableand,ifso,toinstallit. 1. SelectHelp>CheckforUpdates. Iftherearenoupdatesavailable,adialogwillsaysoandyou'redone. 2. Ifthereareupdatesavailable,selectAndroidDDMS,AndroidDevelopmentTools,andAndroidHierarchyViewer,then clickNext. 3. IntheUpdateDetailsdialog,clickNext. 4. ReadandacceptthelicenseagreementandthenclickFinish.Thiswilldownloadandinstallthelatestversionof AndroidDDMSandAndroidDevelopmentTools. 5. RestartEclipse. Ifyouencounterproblemsduringtheupdate,removetheexistingADTpluginfromEclipse,thenperformafreshinstallation, usingtheinstructionsforInstallingtheADTPlugin.
Exceptasnoted,thiscontentislicensedunderCreativeCommonsAttribution2.5.Fordetailsandrestrictions,seetheContent License. SiteTermsofServicePrivacyPolicyBrandGuidelines

Gototop

4of4

5/27/20117:23AM

S-ar putea să vă placă și