Andorid 开发环境搭建
以下总结了android安装步骤
1:JDK1.6安装
Sun官网下载
下载解压即可
运行其中SDK Manager.exe,可选择安装tools,以及android API
基本文件夹包括如下:
tools
platforms
add-ons
选择安装需要的组件(比如platform-tools\Android x.x.x API等等)。
注意:在安装的过程中,可以点击进度条右侧的log信息,查看,发现自动安装程序连接网络上的xml文档,解析,安装文件(先把文件下载到temp文件夹下,然后再安装)。明白了这一点,就可以先手动将所需的安装包预先下载,然后放在temp下,再运行安装程序,此时它就会自动跳过下载这一环节(这样做主要是为了避免在先安装速度太慢的问题)
例:其会访问https://dl-ssl.google.com/android/repository/repository-5.xml 文件,其中包含了Android各版本的zip包位置,例如
<sdk:system-image>
<sdk:revision>2</sdk:revision>
<sdk:description>Android SDK Platform 4.0</sdk:description>
<sdk:api-level>14</sdk:api-level>
<sdk:abi>armeabi-v7a</sdk:abi>
<sdk:archives>
<sdk:archive arch="any" os="any">
<sdk:size>99621822</sdk:size>
<sdk:checksum type="sha1">d8991b0c06b18d7d6ed4169d67460ee1add6661b</sdk:checksum>
<sdk:url>sysimg_armv7a-14_r02.zip</sdk:url>
</sdk:archive>
</sdk:archives>
</sdk:system-image>
就是对应andorid4.0 下的 ARM EABI v7a System Image,其文件大小为90多兆,其下载地址就是https://dl-ssl.google.com/android/repository/sysimg_armv7a-14_r02.zip
当然在这一环节,可以选择安装一些第3方库的支持,比如Google的API(包含google 地图api)等等
3:eclipse解压
4:ADT
Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.
其官网描述安装方式如下:
1 Start Eclipse, then select Help > Install New Software....
2 Click Add, in the top-right corner.
3 In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
https://dl-ssl.google.com/android/eclipse/
Click OK
Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
4 In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
5 In the next window, you'll see a list of the tools to be downloaded. Click Next.
6 Read and accept the license agreements, then click Finish.
Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
7 When the installation completes, restart Eclipse.
由于联网时间过长,推荐用离线下载包安装,经验发现,访问http://dl.google.com/android/ADT-x.x.x.zip (其中x.x.x即版本号),即可下载。
为避免联网安装中提示版本错误之类的麻烦,直接将zip压缩文件中的plugins和features中内容拷贝到eclipse安装目录对应文件夹下。
5最后就是配置Android SDK Manage,指明sdk位置就好