`
退役的龙弟弟
  • 浏览: 446261 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

andriod搭建开发环境

 
阅读更多

Android 开发环境搭建指南

  • 下载所需工具
    • JDK
    • Android SDK(android Software Development Kit,android软件工具开发包)
    • Eclipse
  • 开始安装
  • 环境变量的配置
    • Tools路径添加到系统环境变量中
    • 下载ADT
    • 选择Developer Tools
    • 导入SDK路径
    • Android SDK manager

 

本文是 Android 开发环境搭建指南文档。

<!--[if !supportLists]-->(一)<!--[endif]-->下载所需工具

<!--[if !supportLists]-->1.  <!--[endif]-->JDK(Java Development Kit,Java 开发工具包)

 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html

<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_31" o:spid="_x0000_i1055" type="#_x0000_t75" style='width:359.25pt;height:213.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if !supportLists]-->2.  <!--[endif]-->Android SDK(android Software Development Kit,android软件开发工具包)

 下载地址:http://developer.android.com/index.html

<!--[if gte vml 1]><v:shape id="图片_x0020_30" o:spid="_x0000_i1054" type="#_x0000_t75" style='width:279.75pt; height:222pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_29" o:spid="_x0000_i1053" type="#_x0000_t75" style='width:284.25pt; height:161.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

<!--[if !supportLists]-->3.  <!--[endif]-->Eclipse(一种IDEIntegrated Development Environment ,集成开发环境)

 下载地址:http://www.eclipse.org/

<!--[if gte vml 1]><v:shape id="图片_x0020_28" o:spid="_x0000_i1052" type="#_x0000_t75" style='width:299.25pt; height:130.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image007.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

<!--[if gte vml 1]><v:shape id="图片_x0020_27" o:spid="_x0000_i1051" type="#_x0000_t75" style='width:414.75pt; height:102.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

<!--[if gte vml 1]><v:shape id="图片_x0020_26" o:spid="_x0000_i1050" type="#_x0000_t75" style='width:297.75pt; height:150.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

<!--[if !supportLists]-->(二)<!--[endif]-->开始安装

<!--[if !supportLists]-->1.  <!--[endif]-->安装JDK

 <!--[if gte vml 1]><v:shape id="图片_x0020_25" o:spid="_x0000_i1049" type="#_x0000_t75" style='width:306.75pt;height:231.75pt;visibility:visible; mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image012.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

默认的是:C:\Program Files\Java\jdk1.7.0_07\

改为:D:\JavaAndOther\jdk1.7.0_07\

<!--[if gte vml 1]><v:shape id="图片_x0020_24" o:spid="_x0000_i1048" type="#_x0000_t75" style='width:326.25pt; height:246.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image014.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

安装JRE

默认的是:C:\Program Files\Java\jre7\

<!--[if gte vml 1]><v:shape id="图片_x0020_23" o:spid="_x0000_i1047" type="#_x0000_t75" style='width:252.75pt; height:191.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image016.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

<!--[if gte vml 1]><v:shape id="图片_x0020_22" o:spid="_x0000_i1046" type="#_x0000_t75" style='width:300pt; height:226.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image018.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

cmd中输入:java -version

<!--[if gte vml 1]><v:shape id="图片_x0020_21" o:spid="_x0000_i1045" type="#_x0000_t75" style='width:399.75pt; height:151.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image020.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

<!--[if !supportLists]-->2.  <!--[endif]-->安装SDK

 <!--[if gte vml 1]><v:shape id="图片_x0020_20" o:spid="_x0000_i1044" type="#_x0000_t75" style='width:380.25pt;height:293.25pt;visibility:visible; mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image021.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

 

<!--[if gte vml 1]><v:shape id="图片_x0020_19" o:spid="_x0000_i1043" type="#_x0000_t75" style='width:315pt; height:243pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image022.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

 

 

两个模式都可以选

<!--[if gte vml 1]><v:shape id="图片_x0020_18" o:spid="_x0000_i1042" type="#_x0000_t75" style='width:380.25pt; height:293.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image024.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

默认的安装路径:C:\Program Files\Android\android-sdk

改为:D:\JavaAndOther\andriod_sdk\

<!--[if gte vml 1]><v:shape id="图片_x0020_17" o:spid="_x0000_i1041" type="#_x0000_t75" style='width:380.25pt; height:293.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image025.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

是否创建快捷方式:选择否

<!--[if gte vml 1]><v:shape id="图片_x0020_16" o:spid="_x0000_i1040" type="#_x0000_t75" style='width:380.25pt; height:293.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image026.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

选择是否启动SDK管理器,选择否

<!--[if gte vml 1]><v:shape id="图片_x0020_15" o:spid="_x0000_i1039" type="#_x0000_t75" style='width:380.25pt; height:293.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image027.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

<!--[if !supportLists]-->3.  <!--[endif]-->安装eclipse

 

 

直接解压至你要安装的路径即可

安装路径:D:\JavaAndOther\eclipse

 

<!--[if !supportLists]-->(三)<!--[endif]-->环境变量的配置

<!--[if !supportLists]-->1.     <!--[endif]--> tools 路径添加到系统环境变量中

  右键我的电脑 属性 高级 环境变量

<!--[if gte vml 1]><v:shape id="图片_x0020_14" o:spid="_x0000_i1038" type="#_x0000_t75" style='width:317.25pt; height:371.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image028.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

<!--[if gte vml 1]><v:shape id="图片_x0020_13" o:spid="_x0000_i1037" type="#_x0000_t75" style='width:270.75pt; height:121.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image029.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

在末尾添加:;D:\JavaAndOther\andriod_sdk\tools;

 

<!--[if !supportLists]-->2.     <!--[endif]-->下载ADT(最新版本为20)

地址:http://developer.android.com/tools/sdk/eclipse-adt.html

<!--[if gte vml 1]><v:shape id="图片_x0020_12" o:spid="_x0000_i1036" type="#_x0000_t75" style='width:324pt; height:100.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image030.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

ADT解压到D:\JavaAndOther\ADT-20.0.3(不解压也可以)

 

启动eclipse-> help ->install new software

添加ADT

file:/D:/JavaAndOther/ADT-20.0.3/

<!--[if gte vml 1]><v:shape id="图片_x0020_11" o:spid="_x0000_i1035" type="#_x0000_t75" style='width:372.75pt; height:57pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image032.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="图片_x0020_10" o:spid="_x0000_i1034" type="#_x0000_t75" style='width:282.75pt; height:199.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image033.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

选择Deverloper Tools

<!--[if gte vml 1]><v:shape id="图片_x0020_9" o:spid="_x0000_i1033" type="#_x0000_t75" style='width:358.5pt; height:306pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image035.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

重启eclipse

<!--[if gte vml 1]><v:shape id="图片_x0020_8" o:spid="_x0000_i1032" type="#_x0000_t75" style='width:405.75pt; height:125.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image037.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if !supportLists]-->3.     <!--[endif]-->导入SDK路径

 重启之后点击windows prefrens 点击android

它会自动找到JDK位置

<!--[if gte vml 1]><v:shape id="图片_x0020_7" o:spid="_x0000_i1031" type="#_x0000_t75" style='width:333.75pt; height:255.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image038.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

 

<!--[if !supportLists]-->4.     <!--[endif]-->Android SDK manager

下载你需要的android版本 (很慢)

<!--[if gte vml 1]><v:shape id="图片_x0020_6" o:spid="_x0000_i1030" type="#_x0000_t75" style='width:339pt; height:240pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image040.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

之后点击AVD manager

 

<!--[if gte vml 1]><v:shape id="图片_x0020_5" o:spid="_x0000_i1029" type="#_x0000_t75" style='width:327pt; height:231pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image042.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

 

 

 

<!--[if gte vml 1]><v:shape id="图片_x0020_4" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:285pt; height:330pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image044.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

点击新建的模拟器

<!--[if gte vml 1]><v:shape id="图片_x0020_3" o:spid="_x0000_i1027" type="#_x0000_t75" style='width:321pt; height:245.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image046.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

<!--[if gte vml 1]><v:shape id="图片_x0020_2" o:spid="_x0000_i1026" type="#_x0000_t75" style='width:316.5pt; height:241.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image048.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

 

<!--[if gte vml 1]><v:shape id="图片_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:198pt; height:236.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\tydldd\AppData\Local\Temp\msohtmlclip1\01\clip_image050.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics