AndroidToolsforEclipse,Android

开发工具 4
ToolsforEclipse EclipseDayatGoogleplex2010August26th,2010 XavierDucrohet-GoogleInc. Androidplug-insforEclipse Providefamiliarworkflowbuildlaunchconfigurationdebug Hidetheandroid-specificsoupAndroidbuildisnonstandardDebuggersetuprelyonothertoolsDealwiththeexternaltools CurrentState ADT0.9.7ispublic(05/2010)SDKTools,revision6 Next:ADT0.9.8SDKTools,revision7EntirelydevelopedintheopenInstabilization(tools_r7branch)Released"soon" WorkingonnextversioninmasterbranchSDKtools,revision8ADT?
.?
.?
AndroidProjects 3typesofprojectsregularappprojectcode+resourcesgenerateAPKTestProjectGeneratetestAPKLibraryprojectcode+resourcesusedbyregularappprojects AndroidLibraryProjects Goalisreusingcodeandresourceslibrarycodeesseslibraryresources. TypicalusecasesFreeandpaidversionsCustomwidgetreusedby2+apps ProblemResourcesareessedusingintegerIDs.IDsaregeneratedfromresources(R.java)OnlyonepoolofresourcesperapplicationLibraryProjectsshouldworkonearlierversionsofAndroid BuildingapplicationswithLibraries aaptgeneratesR.javafromallresourcesappproject+librariesnonamespace=>specificorderforoverridingvalues NewproblemJavaconstantsareinlined.=>Can'pilelibrarycodebeforegeneratingfinalR.java pilelibraryresourcesintheapplicationprojectLimitation:Libraryprojectsaresourceonly. AndroidLibraryProjects ContainsManifest(unusedfornow)SourcecodeResources BuildstepsoftheLibraryProjectCompileresourcesCompileaidlCompileJavaCode Actually,nousableoutputCompilationdoneforverificationonly.ApplicationManifestmustmanuallydeclarewhatthelibrary(ies)declares. AndroidApplicationProjects application:.example.myapplibrary:.example.mylibrary Buildprocess:pileresourcesandgenerate2identical.example.mylibrary.R compilelibrarycodeandappcode.linkedsourcefolder.usegenfolderofthemainapplication LibraryProjectsSetup Allconfigurationdoneindefault.propertiesplatformversiontargetisLibraryflaglibrarydependencies NoEclipseprojectreferencesinthebuildpath. Why?
SingleconfigurationpatiblewithAnt.MixEclipse/AntusersinaTeam.DevelopwithEclipse,automatedbuildreleasewithAnt. LibraryProjects Demo LibraryProjects Introducedinr6/ADT0.9.7 Newinr7/ADT0.9.8LibraryprojectwithlibrarydependenciesFixalotofissuesrelatedtolinkedfolderinEclipsemuchmorerobustsupportforanynameinthesourcefolderssupportfor2+sourcefolders What'snext?
ManifestmergeFixissuerelatedtocustomviewattributesIssuewithduplicateerror/warning,refresh,... EditingAndroidfiles JavaishandledbyJDTXMLfiles AndroidManifestValues(strings,colors,...)LayoutsMenudefinitionSettingsdefinition 9-patchbitmapsnotyetintegratedintoADT LayoutEditor LotsofchallengesRenderingfidelityComplexuserinteractivityUIforalotofattributes LayoutRendering:Architecture LayoutRendering:layoutlib LibrarybundledwiththeSDKOneperplatformversion(1.5,1.6,2.1,2.2,...)100%JavaLoadeddynamicallybyADTStateless AndroidViewSystem2DDrawingAPIreimplementedofJava2D ResourceManagerAPIusedbyViewSystemQueryResourcesResolveTheme/reference ResourcesparsedbyADT Layoutlibchallenges Catchingupsupportforalldrawingmodesaddedgradientsin2.1alotmoretodobackporttopreviousversions?
Keepingupwithframeworkschangesnewdependenciesnotpartoflayoutlibnewoptionsthatchangestheinteractivity LayoutRendering:layoutlib LayoutEditor-CustomViews SupportwithsomelimitationsConstructor,onDrawDon'tessplatform-onlyAPIdatabasesensorstartthread,... View.isInEditMode LayoutEditor CurrentPublicversionRenderingPropertyViewforattributesVerybasicdraganddrop(palette=>layout) NextversionNewcanvas/interactivityFulldraganddropsupportpalettetolayoutlayouttolayoutbaseframeworkdoneneedtoworkonvisualcluetuneinteractivityDevelopedinparallelwithcurrentversion LayoutEditor Demo LayoutEditor Longerterm:newpalettenewpropertiespanenewresourceselectorlayout-optintegration IncrementalchangesdirectlyineachADTrelease. Testing android.jarhasnocodeCannotruntestsontheJVM AndroidInstrumentationFrameworkRunsJUnittestsonthedevicemandline:adbshellaminstrument...Textoutput IntegrationintoEclipse RunningJUnitTests RunningJUnitTests Demo Profiling TraceViewStandaloneTool(SWT)toseetraces hproffilesNonstandard,butconverteravailable BothnowcontrolledthroughDDMSandintegratedinADT. ProfilingLayout HierarchyViewerConnecttodevicetogetruntimelayout.Displaylayouttree.Pixelperfectdisplay,loupe. OriginallywroteinSwing. NewversionbeingrewritteninSWTwithplannedintegrationinEclipseasaplug-in. TheFutureisopen SDKTools,rev7/ADT0.9.8developedintheopen.Nointernalchanges(mirroronly).ingfromthetools_r7branch(announcedonandroid-contrib). SDKTools,rev8/ADT?
.?
.?
developmentongoingintheopeninmasterbranch. Externalcontributions Alreadyeptingcontributions,buteoutofnowhere.Theydon'tfollowstyle.Wedon'tknowaboutthefeaturebeforethefullpatchisuploaded. Whatneedstohappen?
publishroadmap/todolist.publishclearguidelinesoncontributingtothetools.usetheexternalbugtrackerexclusively.useandroid-contribforalldiscussions. UsefulLinks SDK/ADTdownloadDevGuide,APIreferenceandroid-developersmailinglist/ AndroidsourcecodeDevToolssourcecodeandroid-contribmailinglist.

标签: #应用程序 #机中 #重点 #蓝筹股 #学校 #服务器 #课程 #培训机构