Ophone开发者技术培训PPT文档1

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

OphoneOverviewLiRuofei,BorqsObjective•FamiliarwithIDEsetup•BasicKnowledgeofOphonePlatformandrelatedtoolsAgenda•OphoneArchitecture•OphoneIDESetup•TheFirstApplication—HelloWorld•OphoneApplicationDebug•OphoneSDKStructure•RelatedToolsinOphoneSDK•OphoneProjectStructure•OphonebuildingblocksOphoneArchitectureCanwesetupOphoneIDEin10minutes?OphoneIDESetup•Installeclipse•InstallADT-0.8.0•InstallOphoneSDK1.0OphoneIDESetup-Installeclipse•MakesureJDK1.5orlaterhasbeeninstalledonthecomputer•Download“EclipseIDEforJavaDevelopers”from•Unzipeclipse•RuneclipseOphoneIDESetup-InstallADT•Open“Eclipese-Help-InstallNewSoftware…”,andthenfollowtheguidetoinstall•SelectADT0.8andacceptthelicense•Restarteclipseafterinstallation•CheckiftheADTisinstalledsuccessfullyOphoneIDESetup-InstallSDK•DownloadWindowsSDKandunzipit•Launcheclipse,andselect“Window-Preferences”toopenpreferencespanel•ConfiguretheOphoneSDKfolderAgenda•OphoneArchitecture•OphoneIDESetup•TheFirstApplication—HelloWorld•OphoneApplicationDebug•OphoneSDKStructure•RelatedToolsinOphoneSDK•OphoneProjectStructure•OphonebuildingblocksThefirstapplication–HelloWorldTheFirstApplication—HelloWorld•Launcheclipseandcreateanandroidprojectbyselecting“File-New-Project”•Select“Android-AndroidProject”,andclick“Next”TheFirstApplication—HelloWorld•Inputtherequiredinfo,andthenclick“Finish”.Theprojectnamed“HelloWorld”iscreatedanddisplaysattheleftpanel;TheFirstApplication—HelloWorld•Runtheapplication•theapplicationwillbeinstalledintoemulatorandlaunched.“HelloWorld”displays.Agenda•OphoneArchitecture•OphoneIDESetup•TheFirstApplication—HelloWorld•OphoneApplicationDebug•OphoneSDKStructure•RelatedToolsinOphoneSDK•OphoneProjectStructure•OphonebuildingblocksOphoneApplicationDebug•Checkthelogtofindtheproblem•Setthebreakpoint•Opendebugdialog•DebugtheprojectAgenda•OphoneArchitecture•OphoneIDESetup•TheFirstApplication—HelloWorld•OphoneApplicationDebug•OphoneSDKStructure•RelatedToolsinOphoneSDK•OphoneProjectStructure•OphonebuildingblocksOphoneSDKStructure•docs•samples•tools•libraryAgenda•OphoneArchitecture•OphoneIDESetup•TheFirstApplication—HelloWorld•OphoneApplicationDebug•OphoneSDKStructure•RelatedToolsinOphoneSDK•OphoneProjectStructure•OphonebuildingblocksRelatedToolsinOphoneSDK•emulator•adb•ddms•mksdcard•telnetRelatedToolsinOphoneSDK--emulator•TheOphoneSDKincludesamobiledeviceemulator--avirtualmobiledevicethatrunsonyourcomputer.•HowtolaunchOphoneemulatorRelatedToolsinOphoneSDK--adb•adbisaversatiletoolletsyoumanagethestateofanemulatorinstanceorOphone-powereddevice•Frequentusageofadbcommandintroduction:adbdevicesadbinstalladbpushadbpulladbshelladblogcatadbkill-serveradb—Howtouseadb•Wheretolaunchadb•adbhelp•Usageadbdevices•Beforeissuingadbcommands,itishelpfultoknowwhatemulator/deviceinstancesareconnectedtotheadbserver.Youcangeneratealistofattachedemulators/devicesusingthedevicescommand:•Inresponse,adbprintsthisstatusinformationforeachinstance:•Serialnumber—Astringcreatedbyadbtouniquelyidentifyanemulator/deviceinstancebyitsconsoleportnumber.Theformatoftheserialnumberistype-consolePort.Here'sanexampleserialnumber:emulator-5554•State—Theconnectionstateoftheinstance.Threestatesaresupported:Offline,device,nodeviceDirectingCommandstoaSpecificEmulator/DeviceInstance•Ifmultipleemulator/deviceinstancesarerunning,youneedtospecifyatargetinstancewhenissuingadbcommands.Todoso,usethe-soptioninthecommands.Theusageforthe-soptionis:•Asshown,youspecifythetargetinstanceforacommandusingitsadb-assignedserialnumber.Youcanusethedevicescommandtoobtaintheserialnumbersofrunningemulator/deviceinstances.•Hereisanexample:adbinstall•Youcanuseadbtocopyanapplicationfromyourdevelopmentcomputerandinstallitonanemulator/deviceinstance.Todoso,usetheinstallcommand.Withthecommand,youmustspecifythepathtothe.apkfilethatyouwanttoinstall:•Thedefaultinstalllocationonemulator/deviceisthedirectoryofdata/app•Hereisanexample:adbpush•adbpush:copyingfilestoanemulator/deviceInstance•Thiscommandwillcopyfiletoaspecificlocationoftheemulator/deviceinstance.Theusageis•Inthecommands,localandremoterefertothepathstothetargetfiles/directoryonyourdevelopmentmachine(local)andontheemulator/deviceinstance(remote).•Hereisanexample:adbpull•adbpull:copyingfilesfromanemulator/deviceInstance•Thiscommandwillcopyfilefromaspecificlocationoftheemulator/deviceinstance.Theusageis•Inthecommands,localandremoterefertothepathstothetargetfiles/directoryonyourdevelopmentmachine(local)andontheemulator/deviceinstance(remote).•Hereisanexample:adbshell•adbprovidesanashshellthatyoucanusetorunavarietyofcommandsonanemulatorordevice.Thecommandbinariesarestoredinthefilesystemoftheemulatorordevice,inthislocation:•Toissueasinglecommandwithoutenteringaremoteshell,usetheshellcommandlikethis:•Todropintoaremoteshellonaemulator/deviceinstance,usetheshellcommandlikethis:adblogcat•Youcanusethelogcatcommandtoviewandfollowthecontentsofthesystem'slogbuffers.Thegeneralusageis:•Youcanusethelogcatcommandfromyourdevelopmentcomputerorfromaremoteadbshellinanemu

1 / 56
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功