《Windows下搭建Android 21开发环境.docx》由会员分享,可在线阅读,更多相关《Windows下搭建Android 21开发环境.docx(3页珍藏版)》请在第一文库网上搜索。
1、Windows下搭建Android+21开发环境作为AndrOid开发的初学者,在开发环境搭建上也搜索与参考了很多资料,在这里分享一下,权当笔记。现在,AndroidSDK的最新版本是2.2。但是超过半数的android使用者仍使用Android2.1,我自己的hero也是刷的2.1的RoM。因此,我选择在WindOWS平台下搭建Android2.1开发环境。以上软件包都准备好之后,就能够开始搭建AndrOid2.1开发环境了。工.安装配置JDK6打开下载的JDK安装文件jdk-6u21-windows-i586.exe,选择安装到默认路径即可,即C:ProgramFi1esJavajdk1.
2、6.0_21,安装完成后,设置环境变量(我的电脑属性高级环境变量),添加修改下列项。JAVA_HOME=C:ProgramFi1esJavajdk1.6.0_21C1ASSPATH=.;%JAVA_HOME%1ib;%JAVA_HOME%1ibtoo1s.jarPATH=;%JAVA_HOME%bin;%JAVA_HOME%jrebin(在已有变量值后添加)设置环境变量之后,win+R-cmd-java-version,提示javaversion1.6.0_21,即安装成功。CrC:fIff1)0fSsysteB32C1D.exe口回MicrosoftWindosXPfi5.1.2600版权所
3、有1985-2001MicrosoftCorp.C:DocunentsandSettingsXAdninistratorjava-uersionJauauersion,1.6.0-21,JaaSERuntimeEnuironnentJauaHotSpotC1ientUMC:DocuentsandSettingsXAdninistrator2,解压配置AndroidSDK1.6解压下载的android-sdk-windows-1.6_r1.zip至IJC:android-sdk-windows-1.6_r1,然后设置环境变量,添加修改下列项。Android_Home=C:Xandroid-Sdk
4、-Windows-1.6_r1PATH=;%AndrOiC1HOme%too1s(在已有变量值后添加)设置环境变量之后,win+R-cmd-android-h,提示帮助信息,即安装成功。C二C:I!)OSsyste32C1D.exeMicrosoftWindotsXP5.1.2600版权所有1985-2001MicrosoftCorp.DocunentsandSettingsdninistratorandroid-hUsage:androidg1oba1optionsactionactionoptionsG1oba1options:uverboseinted.hhe1p-s-si1entUer
5、bosenode:errors,warningsandinformationa1messagesareprHe1ponaspecificcommand.Si1entnode:on1yerrorsareprintedout.IUa1idactionsare-1ist11ist-1ist-create-noue-de1ete-updateaudtargetaudaudaudaudcomposedofauerbandanoptiona1directobject:1istsexistingtargetsorvirtua1devices.:1istsexistingAndroidUirtua1Deuic
6、es.:1istsexistingtargets.:CreatesanewAndroidUirtua1Device.:MovesorrenamesanAndroidUirtua1Device.:DeIetesanAndroidUirtua1Device.:UpdatesanAndroidUirtua1Devicetonatchthefo1dersofanewSDK.-createproject-UDdateWieCt:CreatesaneviAndroidProject.:UDdateSanAndrOidProjectmusthaueanAndrOidManifeSt3.解压Ec1ipse解压
7、下载的ec1ipse-java-ga1i1eo-SR2-win32.zip到C:ec1ipse,然后进入目录,双击ec1ipse.exe,启动EC1iPSe.1oadingWorkbenchc1ipseGA1I1EO(c)CopyrightEc1ipsecontributorsandothers.2000,2010.A11rightsreserved.Javaandaf1Java-re1atedtrademarksand1ogosaretrademarksorregisteredtrademarksofSunMicrosystems.Inc.intheU.S.,othercountries,o
8、rboth.Ec1ipseisatrademarkOftheEc1ipseFoundation,Inc.5.关联AndrOidSDKADT下载安装完成后,Window-Preferences,打开PreferenCeS对话框,点击对话框左侧Android,然后在对话框右侧AndroidReference中,点击SDK1ocation右侧Browse.,选择C:android-sdk-windowsT.6_rT,然后“0K”。Down1oadingSDKP1atformAndroid1.5,API3,revision4(97%,103KiB/s,11seconds1eft)III-I-I-.-I
9、,-III-Ii-IIZI-III1|CC1Down1oadingSDKP1atformAndroid2.1,API7,revision2人Insta11ingSDKP1atformAndroid2.1,API7,revision2Insta11edSDKP1atformAndroid2.1,API7,revision2Dowit1oadingSamp1esforSDKAPI7,revision1Insta11ingSamp1esforSDKAPI7,revision1Insta11edSamp1esforSDKAPI7,revision1Down1oadingGOOgIeAPIsbyGoog
10、ieInc.,AndroidAPI7,revision1Insta11ingGoog1eAPIsbyGoog1eInc.,AndroidAPI7,revision1Insta11edGoog1eAPIsbyGOogIeInc.,AndroidAPI1,revision1DowxJ1oadingSDKP1atformAndroid1.6,API4,revision3Insta11ingSDKP1atformAndroid1.6,API4,revision3Insta11edSDKP1atformAndroid1.6,API4,revision3Down1oadingGoog1eAPIsbyGOogIeInc.,AndroidAPI4,revision2Insta11ingGoog1eAPIsbyGoOg1eInc.,AndroidAPI4,revision2Insta11edGoog1eAPIsbyGoog1eInc.,AndroidAPI4,revision2Down1oadingSDKP1atformAndroid1.5,API3,revision4v到此,在Windows下的Android2.1开发环境就搭建成功了。