Eclipse配置Android_第1頁(yè)
Eclipse配置Android_第2頁(yè)
Eclipse配置Android_第3頁(yè)
Eclipse配置Android_第4頁(yè)
Eclipse配置Android_第5頁(yè)
已閱讀5頁(yè),還剩24頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、全程演示an droid開(kāi)發(fā)環(huán)境的搭建過(guò)程,無(wú)需配置環(huán)境變量。所有軟件都是寫(xiě)該文章時(shí)最新 版本一相關(guān)下載(1) java JDK 下載:進(jìn)入該網(wǎng)頁(yè):(或者直接點(diǎn)擊下載)如下圖I a rv出附春弟JDK 6 Update 19 (JDK or JRE)This release contains critical security updates to the Java runtime. Piease update now to take advantage of these enhancements. n Learn moreWhat Java Do I Heed? You must have

2、a copy of the J RE (Java Runtime Environment) on your system to run Java applications and applets. To develop Java applications and applets, you n eed the J OK (Java Development Kit): which includes the J&ENOTE The Firefox 3.6 brow aer requires Java SE 6 Update 10 or later. Otherwise, Javabased

3、web applications will 訶 worKDownkiad JDKDocs DownloadDu us 選擇Download JDK 只下載JDK,無(wú)需下載jre.(2) eclipse 下載進(jìn)入該網(wǎng)頁(yè):/downloads/(或者直接點(diǎn)擊下載:BT下載 HTTP下載)如下圖:Eclipse PackagesProjectsDevelopment BuildsGalileo Packages (based on Eclipse 3.5 SR2; - Compare PackagesiEclipse IDE for Java EE Deve

4、lopers (190 MB)Tools for Java dewelopers creating Ja'3 EE and wed applications, incfuding a Java IDE. tools for Java EE, J PA, J8F, Mylyn and others. More,Downloads 868,089Windows 32bMac Carbon 1 Mac Cocoa BLinux 32bit *xEclipse IDE for Java Developers (92 MB)The essential tooisfor an/Java devel

5、oper, including a Java IDE, a CVS dient XhIL Editor an<5 Mylyn. More.Downloads: 25Bt541Windows 32bMac Carbon 1Mac Cocoa 3; Linux 32bit fJrf-Eclipse IDE for C/C+ Developers (79 MB)An IDE for C/C+ developers with M/lyn integration. More.Downloads: 130d736Windows 32b Mac Carbon - Mac Cocoa 3j Linux

6、32bit fEclipse for PHP Developers (139 MB)Tools for PHP developers creating .Vet) applications, including PHP Development Tools (PDT), Web Tools Platform. My5yn and others More.Downloads: 103,015/Vindows 32b Mac Carbon : Mac Cocoa 3: Linux 32bit f我們選擇第一個(gè)(即 eclipse IDE for java EE Developers)下載 An dr

7、oid SDK說(shuō)明:An droid SDK兩種下載版本,一種是包含具體版本的SDK的,一種是只有升級(jí)工具,而不包含具體的SDK版本,后一種大概20多M,前一種70多M。完全版下載(android sdk 2.1 r01)升級(jí)版下載(建議使用這個(gè),本例子就是使用這個(gè)這里面不包含具體版本,想要什么版本在Eclipse里面升級(jí)就行)二軟件安裝(1) 安裝jdk 6u19安裝完成即可,無(wú)需配置環(huán)境變量(2) 解壓eclipseeclipse無(wú)需安裝,解壓后,直接打開(kāi)就行(3) 解壓an droid sdk這個(gè)也無(wú)需安裝,解壓后供后面使用最終有三個(gè)文件夾,如下圖::夸計(jì)算匸本堀藝孟;(印¥

8、Android 朋 包含到庫(kù)申*共事.新建文狛決燔改日期2010/4/3 12:1S2010/4/3 12:12文樣裘2010/4/2 19:16名稱尋下截真園最近訪問(wèn)的位jndroid-sdk_r04-windows &clipse-jee-galileQ-SR2'Win32lzipI - -| jdk'6ul9'windcw£-i586.exeM庫(kù)Q視頗fc-窮片列文檔 崗迅雷下載奩樂(lè)礙家庭組>計(jì)帥化 windows 7 (C口(D:)l “ program anc._,本地逸(F:).,j(G:J開(kāi)發(fā)與學(xué)習(xí)(L歡詩(shī)娛樂(lè)(J:Roamingm

9、個(gè)對(duì)象Eclipse酉己置1安裝an droid開(kāi)發(fā)插件(1)打開(kāi)Eclipse,在菜單欄上選擇help->lnstall New Software 出現(xiàn)如下界面Availablle SoftwareSelect a site or enter the location of a site.Work with:Find more software by working with the Azflilablatype After textNameVersion(jJ There is no site selected.Detailsi Hide items that are already

10、 installedWhat is 制飛3古 inMIed?7 Show only the latest versions of available softwarey Group items by categoryJ Contact all update ites during install to find required software運(yùn) Add SiteName:AndroidLocal.Locations https:/dl-ssf,googlexam/android/edipse/Archive-.OK輸入網(wǎng)址:https:/dl-ssl.google.eom/android/

11、eclipse/ http)(如果出錯(cuò),請(qǐng)將https改成名稱:An droid (這里可以自定義)點(diǎn)擊0K,將出現(xiàn)如下界面 InstaH點(diǎn)擊Next按鈕,出現(xiàn)如下界面 InstaHAvailable SoftwareCheck the ftems that you wish to install.Work with: Android - httpst/dl-ssl.googlexom/androfd/eclipse/Find more software by working with the ZUmil日ble>監(jiān) Android DDMS0.9.6.v201002051504-248

12、464 <. - Android Development Tool 0.9v201002051504-24846點(diǎn)擊Next按鈕,出現(xiàn)如下界面 InstaH點(diǎn)擊Next按鈕,出現(xiàn)如下界面 InstaHi Hid? items that are already installedWhat is ahemcJjDetails/ Show only the latest versions of available softwareJ Group items by categoryJ Contact all update ites during install to find required

13、softwareNext >Install DetailsReview the items to be installed.點(diǎn)擊Next按鈕,出現(xiàn)如下界面 InstaH點(diǎn)擊Next按鈕,出現(xiàn)如下界面 InstaHName參 Android DDMSr Android Development ToolsVersion Id0.9.6.v2.,. com.android.fde.eclipseddms.feture.,.0.9h6,v2. com,android.Ede.eclipse.dt,featjreHgr,點(diǎn)擊Next按鈕,出現(xiàn)如下界面 InstaH點(diǎn)擊Next按鈕,出現(xiàn)如下界面 I

14、nstaHSize: UnknownDetails點(diǎn)擊Next按鈕,出現(xiàn)如下界面Install選擇 I accept the terms of the license agreements點(diǎn)擊Next,進(jìn)入安裝插件界面InstallReview LicensesLcenses must be reviewed before the sofhvare can bm installed. This includes icenses for sofhvare required to install.Items with licenses:License text:NameVersionJ>.-

15、 Android DDMS0.9.6.V2CHD02051504-24B46Android Development Toolsv Mylyn Bridge: Eclipse IDE站.Myiyn Bridge;ava Deveopment-y = Mylyn Bridget Team Support 樂(lè) Mylyn Connector: BugzillaMylyn Task List (Required)< Mylyn Task-Focused Interface (Rec». .Mylyn WikiText0,9.6.v201002051504-243433J.v201003

16、3(-0100-e3x3.3.3. v201Q0330-0100-e3x3.3.3. v20100330-0100-e3x3.3.3.v2D100330-01D03x3.3.3.v201003300100-e3x333.v20100330-0100-e3x1.2. l.v2010D2 2 2-0100-e3xNote: jcomnnan'lbO.12jar is undei than the APL You can find a copy http:/wvw. pe nsciLirx:F.cirg/litFnsEjfreechjrt-l.O.S.jar Bnd jfreechari t

17、he LG PL rather than the APL You LG PL at h-?: p:/jvww. g n . rg/l i c e r s t NLtxt You can get the source co( components at http:/android,gitkemeLorg/pub/jApache LicenseVersion 2.0r Janhttp:/A/w.apach<TERMS AND 匚ONDmONS FOR AMD DISTRIBUTION1. Definitions.1 accept the terms of th聲 license o I do

18、 not accept the term5 of thtNoct >選擇 I accept the terms of the license agreements點(diǎn)擊Next,進(jìn)入安裝插件界面安裝完成后,出現(xiàn)如下界面點(diǎn)擊Yes按鈕,重啟 Eclipse2 配置 an droid sdk(1)點(diǎn)擊菜單window->preferences,進(jìn)入如下界面畫(huà) Preferencestype filter textGeneralAndroidBuildDDMSLaunchLog CatUsge StatsAntData ManagementHelpInstall/UpdateJavaJav

19、a EEPlug-in DevelopmentRemote Systems Run/DebugServerAndroid3 于 * Android PreferencesSDK Location: F:AndroidandrcId-dk_r04'window5androSd-sBrowse.,Note: The list of SDK Targets below is only reloaded once you hit 'Apply1 or 'OKTasksTeamTerminalUsage Data Collector nrRestore DefaultsApply

20、OKCancel選擇你的an droid SDK解壓后的目錄,選錯(cuò)了就會(huì)報(bào)錯(cuò),這個(gè)是升級(jí)工具,目前還沒(méi)有 一個(gè)版本的SDK(2)升級(jí) SDK 版本,選擇菜單 window->Android sdk and avd manager出現(xiàn)如下界面F. q Android SDK and AVD ManagerF. q Android SDK and AVD ManagerVirtual Device?Installed PackagesAvailable PackagesSDK Location: F:Androidand raid-sdk_r04-windowsan droid-sdk-wi

21、ndowsInstalled PackagesAndroid SDK Tools, revtsLon 4DescriptionUpdate All.選擇update all按鈕,出現(xiàn)如下界面PackagesX Android SDK Tools, revision 52 SDK Platform Android 2.1. API 7, re,., v* Samples for SDK API 7, revision 1X Google APIs by Google Inc,. Android X SDK Platform Android 2.0,1, API 6,X Googte APIs b

22、y Google Inc, AndroidX SDK Ratform Android 2.0, API 5, re,., X Google APJs by Googl? Inc., Anciroi.X SDK Platform Android 1.6, API 4, remSiomething depends on thi-;Package Description & LicenseAndroid SDK Tools, revision 5This update will replace revision 4 with revision 5.Airhivo DgruriiHionArc

23、hive for WindowsShe: 22 MiBSHA1: 13d4f033d2637bfec85bb45cflcl623c33127d93InstallAct選擇左邊的某一項(xiàng),點(diǎn)擊accept表示安裝,點(diǎn)擊reject表示不安裝,我這里只選了 SDK 2.1 和samples for api 7,自己可以任意自定義,確定后,選擇in stall按鈕,進(jìn)入安裝界面如下安裝完成如下:(3)新建 AVD(a ndroid vitural device)禾口上面一樣,進(jìn)入an droid sdk and avd man ager,選 中VituralDevices在 點(diǎn) 擊New按 鈕Virt

24、ual DevicesInstalled Packages Available PackagesAVD NameTarget NamePlatformAPI Level一No AVD available-List of existing Android Virtual Devices:Android SDK and A;D ManagerV A valid Android Virtual Device.X An Android Virtual Device that failed to load. Click 'Details' to see the error.點(diǎn)擊New按鈕

25、后,進(jìn)入如下界面Create new AVD名稱可以隨便取,target選擇你需要的SDK版本,SD卡大小自定義,點(diǎn)擊Create AVD,得 到如下結(jié)果畫(huà) Android Virtual Devices Managerof creating AVD 'AVD2.11:Created AVD 'AVD2.1' based on Android 2.1, with the following hardware config:hw. led. density=160OK如上顯示創(chuàng)建AVD完畢3新建An droid項(xiàng)目(1)選擇菜單file-new->other進(jìn)入如下

26、界面回Select a wizardWizards:type fibter text業(yè) Java Project from Existing Ant Buildfile"1 盅 Plug-in Project l> 冷 General / & AndroidAndroid ProjectLJjf1 Android Test Project 陸 Android XML Ale、匚onnection Profilest>CVSEclipse Modeling Framework u a)< BackNext >FinishCancel選擇新建An droi

27、d Project項(xiàng)目,點(diǎn)擊 Next按鈕,進(jìn)入如下界面New Android ProjectNew Android ProjectCreates a new Android Project resource.Project name: AndroidTest匚 cntents* Create new projert in workspaceCreate project rom existing source/ Use default location名稱自定義,應(yīng)用程序名自定義,報(bào)名必須包含一個(gè)點(diǎn)以上,min SDK version里面必須輸入整數(shù)點(diǎn)擊Next出現(xiàn)如下界面名稱自定義,應(yīng)用程序

28、名自定義,報(bào)名必須包含一個(gè)點(diǎn)以上,min SDK version里面必須輸入整數(shù)點(diǎn)擊Next出現(xiàn)如下界面名稱自定義,應(yīng)用程序名自定義,報(bào)名必須包含一個(gè)點(diǎn)以上,min SDK version里面必須輸入整數(shù)點(diǎn)擊Next出現(xiàn)如下界面名稱自定義,應(yīng)用程序名自定義,報(bào)名必須包含一個(gè)點(diǎn)以上,min SDK version里面必須輸入整數(shù)點(diǎn)擊Next出現(xiàn)如下界面/.匚 re ate Activity:Package name:Properties Application name:Min SDK Version:三 Rackf'1Next >finrsh jCancel名稱自定義,應(yīng)用程序名

29、自定義,報(bào)名必須包含一個(gè)點(diǎn)以上,min SDK version里面必須輸入整數(shù)點(diǎn)擊Next出現(xiàn)如下界面遂 Java AndroidTest/gen/Android/Test/R.javaFile Edit Refactor Run Source Navigate Search Project Window Help:fj 百. a & Jv d 菇曲 G 出 AndroidTest'srcD Android 2.1gen Generated Jav3 FilesassetsresAndroidManifest.xml國(guó) defaultproperties口釦3-寫(xiě) Packag

30、e E乜 Hierarchy%&&&E R.java*7* AUTO-GENERATED FILE.package Android.Test;public final class R DO NOT MODIFY.class attr public static finalpublic static finalpublic static final int Icon=0x7f020000;class drawable public static final class layout public static final int main=0x7f030000;publi

31、c static final class string public static final int app_nazEe=0x7f040public static final int hex2o=0x7f040000凰 Problems 廠 Javadoc Dedwatkm貝 ConsoleAndroid2010-04-03 13:06:17 - AndroxdTesc R.java was remoAndroidTest注: 若有錯(cuò) 誤女口 : Project . is missing required source folder: 'gen',貝U 將 gen->A

32、ndroid.Test->R.java這個(gè)文件刪掉,Eclipse會(huì)為我們重新生成這個(gè)文件,并且不會(huì)報(bào)錯(cuò)。(3) 配置運(yùn)行右鍵項(xiàng) 目 ->R un as -> Run Con figuratio n 進(jìn) 入如下 界面:爸 Run Configurationstype filter text互 Android ApplicationJ Android Target:. CommonAPPCreate, manage and run con figurationsAndroid ApplicationName: New_configuration苗 Newconfiguration j活 Android JUnit: Test Apache Tomcat Eclipse Application t 4 Eclipse Data Tools Generic Server Generic ServerExt亡rru HTTP Preview J2EE Preview呵 Java Applet 工 Java Application Ju JUnitJu JUnit Plug-in Test 出 OSGi Framework Task Context TestX XSLFilter matched 17 of 17 itemsRun該界面,點(diǎn)擊Brows

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論