Android SDK 2.3与Eclipse最新版开发环境搭建(二)
三、 Android SDK安装
Android SDK可以通过SDK下载器自动下载和配置,适合网络好,下载速度快的情况下;也可以借助工具下载SDK文件,手工配置,适合网络不是很好,下载速度慢的情况下。
SDK下载器自动下载步骤如下:
- 解压缩android-sdk_r08-windows下载器,并双击运行SDK Manager.exe:
如果你的电脑不支持https连接会看到如下界面:
请选择setting的将Force https://... Sources to be fetched by using http://... 的选项打勾
- 勾选你想要安装的Packages,并点击Install Selected进行安装:
- 确认对话框如下,选择Accept All进行下载安装
- 则Android SDK下载器进入下载安装的过程
- 根据你网速的情况,下载安装的时间或长或短,请耐心等待。
手动下载步骤如下:
- 通过分析Android下载器的http://dl-ssl.google.com/android/repository/repository.xml 内容,可以得到如下下载列表(以Windows环境为例):
http://dl-ssl.google.com/android/repository/android-1.5_r04-windows.zip
http://dl-ssl.google.com/android/repository/android-1.6_r03-windows.zip
http://dl-ssl.google.com/android/repository/android-2.0_r01-windows.zip
http://dl-ssl.google.com/android/repository/android-2.0.1_r01-windows.zip
http://dl-ssl.google.com/android/repository/android-2.1_r02-windows.zip
http://dl-ssl.google.com/android/repository/android-2.2_r02-windows.zip
http://dl-ssl.google.com/android/repository/android-2.3.1_r02-linux.zip
http://dl-ssl.google.com/android/repository/android-3.0_pre_r01-linux.zip
http://dl-ssl.google.com/android/repository/platform-tools_r02-windows.zip
http://dl-ssl.google.com/android/repository/tools_r09-windows.zip
http://dl-ssl.google.com/android/repository/docs-Honeycomb_pre_r01-linux.zip
http://dl-ssl.google.com/android/repository/samples-Honeycomb_pre_r01-linux.zip
http://dl-ssl.google.com/android/repository/samples-2.1_r01-linux.zip
http://dl-ssl.google.com/android/repository/samples-2.2_r01-linux.zip
http://dl-ssl.google.com/android/repository/samples-2.3_r01-linux.zip
- 请使用下载工具下载到本地,并按如下映射关系解压缩到SDK下载器所在目录,映射关系如下:
android-1.5_r04-windows.zip | platforms\android-3 |
android-1.6_r03-windows.zip | platforms\android-4 |
android-2.0_r01-windows.zip | platforms\android-5 |
android-2.0.1_r01-windows.zip | platforms\android-6 |
android-2.1_r02-windows.zip | platforms\android-7 |
android-2.2_r02-windows.zip | platforms\android-8 |
android-2.3.1_r02-linux.zip | platforms\android-9 |
android-3.0_pre_r01-linux.zip | platforms\android-10 |
platform-tools_r02-windows.zip | platforms-tools |
tools_r09-windows.zip | tools |
docs-Honeycomb_pre_r01-linux.zip | doc |
samples-Honeycomb_pre_r01-linux.zip | samples\android-10 |
samples-2.1_r01-linux.zip | samples\android-7 |
samples-2.2_r01-linux.zip | samples\android-8 |
samples-2.3_r01-linux.zip | samples\android-9 |
- 如果要安装google api,请分析下图中的地址:http://dl-ssl.google.com/android/repository/addon.xml 下载自己需要的Packages进行解压,方法同1、2
下载列表为:
http://dl-ssl.google.com/android/repository/google_apis-3-r03.zip
http://dl-ssl.google.com/android/repository/google_apis-4_r02.zip
http://dl-ssl.google.com/android/repository/google_apis-5_r01.zip
http://dl-ssl.google.com/android/repository/google_apis-6_r01.zip
http://dl-ssl.google.com/android/repository/google_apis-7_r01.zip
http://dl-ssl.google.com/android/repository/google_apis-8_r02.zip
http://dl-ssl.google.com/android/repository/google_apis-9_r02.zip
http://dl-ssl.google.com/android/repository/market_licensing-r01.zip
http://dl-ssl.google.com/android/repository/usb_driver_r04-windows.zip
- 映射关系为:
google_apis-3-r03.zip | add-ons\addon_google_apis_google_inc_3 |
google_apis-4_r02.zip | add-ons\addon_google_apis_google_inc_4 |
google_apis-5_r01.zip | add-ons\addon_google_apis_google_inc_5 |
google_apis-6_r01.zip | add-ons\addon_google_apis_google_inc_6 |
google_apis-7_r01.zip | add-ons\addon_google_apis_google_inc_7 |
google_apis-8_r02.zip | add-ons\addon_google_apis_google_inc_8 |
google_apis-9_r02.zip | add-ons\addon_google_apis_google_inc_9 |
market_licensing-r01.zip | google-market_licensing |
usb_driver_r04-windows.zip | usb_driver |
- 具体的目录结构如下图:
- 解压完成后启动一下SDK下载器,检查是否安装成功,如下图:
注:由于小生在写这篇文章的时候,Android刚出了Android SDK Platform Honeycomb Preview, revision 1,但是却没有把android-3.0_pre_r01-linux.zip放在http://dl-ssl.google.com/android/repository/android-3.0_pre_r01-linux.zip,所以暂时无法下载安装这个版本的Android SDK,但不影响SDK使用。请各位自行下载安装。