外文翻译 - Android简介和开发环境的搭建_第1页
外文翻译 - Android简介和开发环境的搭建_第2页
外文翻译 - Android简介和开发环境的搭建_第3页
外文翻译 - Android简介和开发环境的搭建_第4页
外文翻译 - Android简介和开发环境的搭建_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

附录一英文文献原文AndroidintroductionanddevelopmentenvironmentconstructionThisbarriertoapplicationdevelopmentbegantocrumbleinNovemberof2007whenGoogle,undertheOpenHandsetAlliance,releasedAndroid.TheOpenHandsetAllianceisagroupofhardwareandsoftwaredevelopers,includingGoogle,NTTDoCoMo,SprintNextel,andHTC,whosegoalistocreateamoreopencellphoneenvironment.Thefirstproducttobereleasedundertheallianceisthemobiledeviceoperatingsystem,Android.Android,asasystem,isaJava-basedoperatingsystemthatrunsontheLinux2.6kernel.Thesystemisverylightweightandfullfeatured.AndroidapplicationsaredevelopedusingJavaandcanbeportedrathereasilytothenewplatform.OneofthemoreexcitingandcompellingfeaturesofAndroidisthat,becauseofitsarchitecture,third-partyapplicationsincludingthosethatare“homegrown”areexecutedwiththesamesystempriorityasthosethatarebundledwiththecoresystem.Thisisamajordeparturefrommostsystems,whichgiveembeddedsystemappsagreaterexecutionprioritythanthethreadpriorityavailabletoappscreatedbythird-partydevelopers.Also,eachapplicationisexecutedwithinitsownthreadusingaverylightweightvirtualmachine.TheAndroidsystemisawidelyoptimisticaboutanopensourcephonesystem,thesystemprovidesabasicoperatingsystem,amiddlewareapplicationlayer,ajavadevelopmenttoolsandasystemApplicationcollector(collectionofsystemapplications).TheAndroidtheSDKsince2007onthereleaseofthefirstAndroidphoneinOctober2008beforethebirth.Googleopenedsincethenonhisowntime,TaiwansHTC,themanufactureroftheT-MobileG1estimateG1shipmentshavemorethanonemillionattheendof2008.AccordingtoindustryinsidersexpecttheG1mobilephonesalesin2009continue.Manyothermobilephonesuppliersinthenearfutureplanstosupportthissystem.AroundanAndroidandahugedevelopercommunityhasbeenestablished,whilealotofnewproductsandapplicationsontheAndroid.Androidsmainsellingpointisthatitenablesdeveloperstoseamlesslyexpandonlineservicestomobilephones.ThisisthemostobviousexampleisGooglestightlyintegratedwithGmail,CalendarandContactsWebapplicationsthroughthesystem.UsersonlyneedtoprovideanAndroidusernameandpassword,thephoneautomaticallysyncwithGoogleservices.Theothervendorsarequicklyadapttheirexistinginstantmessaging,socialnetworkingandgamingservices.AndroidandmanycompaniesfindnewwaystointegratetheirexistingbusinesstotheAndroid.AsidefromtheverygenerousSDKandthewell-formedlibrariesthatareavailabletoustodevelopwith,themostexcitingfeatureforAndroiddevelopersisthatwenowhaveaccesstoanythingtheoperatingsystemhasaccessto.Inotherwords,ifyouwanttocreateanapplicationthatdialsthephone,youhaveaccesstothephonesdialer;ifyouwanttocreateanapplicationthatutilizesthephonesinternalGPS(ifequipped),youhaveaccesstoit.Thepotentialfordeveloperstocreatedynamicandintriguingapplicationsisnowwideopen.OntopofallthefeaturesthatareavailablefromtheAndroidsideoftheequation,Googlehasthrowninsomeverytantalizingfeaturesofitsown.DevelopersofAndroidapplicationswillbeabletotietheirapplicationsintoexistingGoogleofferingssuchasGoogleMapsandtheomnipresentGoogleSearch.SupposeyouwanttowriteanapplicationthatpullsupaGooglemapofwhereanincomingcallisemanatingfrom,oryouwanttobeabletostorecommonsearchresultswithyourcontacts;thedoorsofpossibilityhavebeenflungwideopenwithAndroid.NowbeginsyourjourneytoAndroiddevelopment.1、DownloadingandInstallingEclipse(1)SelectingadevelopmentenvironmentInkeepingwiththeOpenHandsetAlliancesthemeoftrulyopeningthemobiledevelopmentmarket,Eclipseisoneofthemostfullyfeatured,free,JavaIDEsavailable.Eclipseisalsoveryeasytouse,withaminimallearningcurve.ThismakesEclipseaveryattractiveIDEforsolid,openJavadevelopment.(2)DownloadingEclipseNavigatetotheEclipseD/downloads.DownloadtheEclipseIDEforJavaDevelopersfromthissite.Thepackageisrelativelysmall(79MB)andshoulddownloadfairlyquickly.(3)InstallingandconfiguringEclipseExpandthepackageandruntheeclipse.exefile.EclipseinstallstoyourUserdirectorybydefault(underMicrosoftWindows).OncetheEclipseinstallationcommences,youwillbepromptedtocreateadefaultworkspace,orfolder.Justasinmostdevelopmentenvironments,projectsarecreatedin,andsavedto,aworkspace.ThedefaultpathfortheworkspaceisyourUserdirectory.Toselectadifferentlocation,clickBrowseandnavigatetoit.Afteryouselectalocationforyourworkspace,clickOK.Atthispoint,yourdevelopmentenvironmentisdownloadedandinstalled.WhiletheinstallationofEclipseseemeddeceivinglyquick,youstillneedtodosomeconfigurationworkbeforeyoucancreateyourfirstAndroidproject.MuchoftheconfigurationworkthatyouneedtodocentersontheAndroidSDKandtheAndroidpluginforEclipse.2、DownloadingandInstallingtheAndroidSDK(1)DownloadingtheAndroidSDKTheAndroidSDKiseasilyaccessiblefromthe/Androidpage.Fromthedevelopmenthomepage,clicktheDownloadtheSDKlinkunderGettingStarted.AfteryouagreetothetermsoftheAndroidSDKLicenseAgreement,youwillseetheDownloadtheAndroidSDKpage.TheAndroidSDKisdownloadedina79MB(forWindows)packageanditshoulddownloadfairlyquickly.Clickthepackagenameforyouroperatingsystemtobeginthedownload.Thereisno“setup”orinstallationprocesstospeakoffortheAndroidSDK;rather,youmustfollowaseriesofstepstoassociatetheSDKwithyourEclipsedevelopmentenvironment.ThefirstofthesestepsistoobtaintheAndroidpluginforEclipse,afterwhichyouwillconfigureit.(2)UsingtheUpdatefeatureofEclipse(3)Downloading,installing,andconfiguringtheAndroidpluginforEclipseInstalling:1)OpentheEclipseapplication.YouwilldownloadtheAndroidpluginforEclipsefromwithintheEclipseIDE.2)ChooseHelp|SoftwareUpdates|FindandInstall.3)IntheInstall/Updatewindow,whichallowsyoutobegintheprocessofdownloadingandinstallinganyofthepluginsthatareavailabletoyouforEclipse,clicktheSearchforNewFeaturestoInstallradiobuttonandthenclickNext.4)TheUpdateSitestoVisitpageoftheInstallwindow,shownnext,listsallthedefaultwebsitesusedforobtainingEclipseplugins.However,thepluginyouwant,AndroidforEclipse,isnotavailablefromthedefaultsites.TodownloadtheAndroidplugin,youmusttellEclipsewheretolookforit,soclicktheNewRemoteSitebutton.5)IntheNewUpdateSitedialogbox,shownnext,youmustentertwopiecesofinformationtocontinue:anameforyournewsite,anditsassociatedURL.Thenameisonlyfordisplaypurposesanddoesnotaffectthedownloadingoftheplugin.IntheNamefield,enterAndroidPlugin.IntheURLfield,entertheURLfromwhichEclipsewillobtaininformationaboutthepluginsthatareavailable:/Android/eclipse/.ClickOK.Configuring:1)FromthemainEclipsewindow,chooseWindow|Preferences.2)InthePreferenceswindow,shownnext,selectAndroidinthemenuontheleft.Ontherightsideofthewindow,clickBrowse,findthelocationoftheAndroidSDKonyourharddrive,andenteritintheSDKLocationfield.EclipseneedsthisinformationtobeabletoaccessallthetoolsthataresuppliedwithAndroid,suchastheemulator.(4)CheckingthePATHstatementThefinalstepinsettinguptheAndroidSDKistoputitintoyourPATHstatement.IfyouareusingaMicrosoftWindowsmachine,right-clickComputer(orMyComputer,dependingonyourversionofWindows)andselectPropertiestoopentheSystemPropertiesdialogbox.ClicktheAdvancedtab.ClickEnvironmentVariablestodisplaythewindowofthesamename,showninthefollowingillustration.ThisiswhereyoucanedityourPATHstatement.UnderSystemVariables,findthevariablePATHanddouble-clickit.IntheEditSystemVariabledialogbox,shownnext,addthelocationofyourAndroidSDKseparatedfromtheexistingpathsbyasemicolonandclickOKtoapplyyourchanges,andclickOKagainintheEnvironmentVariableswindow.3、ExploringtheAndroidSDK(1)UsingtheAndroidSDKdocumentationTheAndroiddocumentationislocatedintheDocsfolderwithintheAndroidSDKat./%sdkfolder%/DOCS.ThedocumentationthatissuppliedwiththeSDKincludesstepsondownloadingandinstallingtheSDK,“GettingStarted”quickstepsfordevelopingapplications,andpackagedefinitions.ThedocumentationisinHTMLformatandcanbeaccessedthoughthedocumentation.htmlfileintherootoftheSDKfolder.YoucannavigatetoallofthedocumentationthatisincludedintheAndroidSDKbyusingthelinkswithindocumentation.html.(2)UsingtheAndroidSDKtools(3)UsingthesampleapplicationsUsingEclipse,loadtheAPIDemosapplicationasaNewAndroidProject.Todothis,selectFile|New|ProjectfromtheEclipsemenubar;aNewAndroidProjectwizardopens.Donotworryabouttheoptionsinthiswizardfornow.SimplyselectCreateProjectFromExistingSourceandbrowsetothefolderwiththeAPIDemoapplicationinit.Whentheprojectisloaded,chooseRuntoseeitexecuteintheAndroidEmulator.(4)LearningthelifecycleofanAndroidapplicationTheAndroidapplicationlifecycleisuniqueinthatthesystemcontrolsmuchofthelifecycleoftheapplication.AllAndroidapplications,orActivities,arerunwithintheirownprocess.AlloftherunningprocessesarewatchedbyAndroidand,dependingonhowtheactivityisrunning(thisis,aforegroundactivity,backgroundactivity,andsoforth),Androidmaychoosetoendtheactivitytoreclaimneededresources.附录二中文译文Android简介和开发环境的搭建在2007年11月,当Google,在开放手机联盟下,发布Android,这个对于应用程序开发者的障开始消失。开放手机联盟是一个硬件和软件开发者组织,它包括Google、NTTDoCoMo,SprintNextel,和HTC,它的目标是创建一个更开放的手机环境。在开放手机联盟组织下发布的第一个产品是Android-移动设备操作系统。Android作为一个系统,是一个运行在Linux2.6内核上的基于Java的操作系统.这个系统非常轻量级的,并且功能丰富.Android应用程序是用Java开发的,能够十分简单的装入新的平台。Android一个最令人兴奋和注目的特色是它的架构,三部分运用程序-包括“home-grown”当这些和内核系统绑定,可带有同样的系统优先权执行。这是和大多系统一个主要的违背,它给了嵌入式系统应用程序一个比进程优先级(从第三方开发者创建的应用程序获得)更大的执行权。每一个应用程序在它自己的进程里使用一个很轻量级的虚拟机执行。Android系统是一个被广泛看好的一个手机开源系统,该系统提供一个基本的操作系统,一个中间件应用层,一个java开发工具和一个系统应用收集器(collectionofsystemapplications)。尽管AndroidSDK自2007年就发布了,但是第一部Android手机却在2008年10月才诞生。自从这时起谷歌开起了自己的时代,T-Mobile的G1的制造商台湾HTC估算G1的发货量在2008年底已经超过100万部。据业内人士预期该G1手机的销量将会在2009年继续保持。不久的将来其他许多手机供应商要计划支持这个系统。一个围绕Android庞大的开发者社区已经建立,同时很多新的产品和应用已经可以在Android上使用。一个Android的主要卖点是它使开发人员无缝把在线服务扩展到手机。这方面最明显的例子是谷歌的紧密集成Gmail,日历和联系人Web应用程序通过该系统。用户只需提供一个Android用户名和密码,其手机自动同步与谷歌的服务。其他厂商正在迅速适应自己的现有的即时通讯,社交网络和游戏服务。Android和许多企业寻找新途径来整合他们的自己已有的业务到Android上。除了我们能够获得用来开发的很大量的SDK和良好的架构库,对于Android开发者最令人兴奋的特色是我们现在允许进入任何操作系统所允许的。换句话说,如果你要创建一个拨电话的应用程序,你可接近电话拨号程序,如果你想创建一个利用电话的内在GPS的应用程序(如果配备),你可以接近它。对于开发者创建动态的和令人感兴趣的应用程序的可能性现在是宽阔开放了。在这些特色中最顶级的是从Android网站可获得的平衡,Google已经投放一些它自己非常逗弄的特色。Android应用程序开发者将能够去把自己的应用程序连接到Google提供的已经存在的程序(例如GoogleMaps、不所不在的Google搜索)上。假设你想写一个获取一个打进电话的发出地的Google地图,或者你想能够存储你联系的一般搜索结果;利用Android可能性的大门已经成为直冲的开放和宽阔。现在将开始你的Android开发之旅。一、下载和安装Eclipse(1)选择一个开发环境为了符合开放手机联盟真正开发手机开放市场的主题,Eclipse是一个最完全该特色、自由、可获得的JavaIDEs中的一个。Eclipse也使用非常简单,最小的学习弯路。这使得Eclipse成为一个非常吸引人的坚固的开源Java开发IDE。(2)下载Eclipse导航进入下载页面:/downloads。从此网站下载Java开发者专用的EclipseIDE。安装包十分小(79M),并且下载也会相当快。(3)安装和配置Eclipse解压安装包,运行eclipse.exe.在windows下,Eclipse默认安装到你用户目录下。一旦Eclipse安装开始,你会被催促去创建一个默认的工作空间,或是文件夹。正如多数的开发环境,工程在工作空间里创建和保存。默认的工作空间路径是你的用户目录。要选择不同的路径,点击Browse,并且导航进入来设置它。在你选择了你工作空间路径后,点击OK。到这,你的开发环境被下载和安装好了。而Eclipse的安装看上去快得出奇,但在你能创建你的第一个Android工程前,你仍然需要去做一些配置工作。许多需要你去完成的配置工作重点是在AndroidSDK和AndroidEclipse插件上。二、下载和安装AndroidSDK(1)下载AndroidSDKAndroidSDK很容易从/Android页面得到。从开发主页,点击“GettingStart”下面的SDK下载链接。在你同意Android许可协议条款后,你将看到AndroidSDK下载页面。AndroidSDK是一个79M的下载包(对于Windows)并且下载会相当快。点击对应你操作系统的包开始下载。对于AndroidSDK,没有“setup”或是安装步骤涉及到。相反,你必须遵照一系列的步骤来把SDK和你的Eclipse开发环境结合起来。这些步骤的第一步是获得AndroidEclipse插件,这之后你要配置它。(2)使用Eclipse更新特性(3)下载、安装和配置AndroidEclipse插件安装:1)打开Eclipse应用程序。你将在Eclipse里面下载AndroidEclipse插件。2)选择Help|SoftwareUpdates|FindandInstall。3)在Install/Update窗口中,它允许你开始下载和安装任何一个对于你的Eclipse可以获得的插件的步骤,点击“SearchforNewFeaturestoInstall”点选按钮,接着点击Next。4)安装窗口中的“UpdateSitestoView”页面,在下面显示,列出了所有已经得到的Eclipse插件的默认网址。然而,你想要的AndroidEclipse插件,在默认网址里没有。为了下载Android插件,你必须告诉Eclipse在哪里可以找到它,因此,点击“NewRemoteSites”按钮5)在NewUpdateSite对话框中,下面显示的,你必须键入两

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论