搭建 Android 软件开发平台
1. 下载 JDK, 安装. 设定环境变量.
JAVA_HOME = C:\Program Files\Java\jdk1.6.0_21
Path = %JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%; …
2. 下载 eclipse 软件, Eclipse IDE for Java Developers, 解压到一个目录, 如
d:\eclipse
3. 下载 Android Developer Tools(这个网址可能需要翻墙, 感谢党感谢国家感谢政府), 解压到一个文件夹, 如 D:\android-sdk-windows, 执行 SDK Setup.exe 文件, 按照图形界面提示, 到 ADT 服务器下载你需要的版本的 API.
这个过程相当漫长, 因为使用 https 协议连接 Google 服务器, 还可能出现连不上服务器的情况(由于 GFW 的存在, 这在大陆是肯定的), 可以在 settings 页面, 勾选 “Force https://… sources to be fetched using http://…” 复选框. 然再到 Available packages 页面选你需要的 API 包, 点击 “Install Selected” 按钮开始下载.


4. 获取并安装 eclipse 的 Android 开发插件 (Obtaining and installing the Eclipse plug-in)
上面几步搞完以后, 启动 eclipse 软件. The following steps demonstrate the installation of the Eclipse plug-in, officially known as Android Developer Tools. Note that alternative installation directions are available from the Android Web site. See Resources for more information.
Install the Android Developer Tools:
- Run the “Find and Install” feature in Eclipse, found under the Help > Install New Software menu.
- Click “Add” Button for new features to install option.
- Select New Remote Site. Give this site a name, such as “Android Developer Tools,” for example. Use the following URL in the dialog: https://dl-ssl.google.com/android/eclipse. Please note the HTTPS in the URL. This is a secure download.
- A new entry is added to the list and is checked by default. Click Finish. The search results display the Android Developer Tools. Select the Developer Tools and click Next.
- After reviewing and accepting the license agreement, click Next. Note that the license agreement includes a special requirement for use of the Google Maps API.
- Review and accept the installation location, then click Finish.
The plug-in is now downloaded and installed. The plug-in is not signed (at the time of writing), so proceed at your own comfort level by clicking on Install All, then restart Eclipse.
5. Configuring the Eclipse plug-in
Once Eclipse is restarted, it is time to connect the plug-in to the SDK installation. Select Preferences under the Window menu. Click on the Android item in the tree view to the left. In the right-hand pane, specify the SDK installation location. The value used for this tutorial is D:\android-sdk-windows (again, use appropriate locations in Mac OS X and Linux installations).

Once the SDK location is specified, there are three other sections that may be configured. They are mentioned here briefly:
- The Build section has options for rebuilding resources automatically. Leave this checked. The Build option can change the level of verbosity. Normal is the default.
- DDMS — Dalvik Debug Monitor Service is used for peering into a running VM. These settings specify TCP/IP port numbers used for connecting to a running VM with the debugger and various logging levels and options. The default settings should be just fine.
- LogCat — This is a log file created on the underlying Linux kernel. The font is selectable in this dialog. Adjust this as desired.
Congratulations! The Eclipse environment is ready to create Android applications.
到此为止, 开发环境搭建完毕.
延伸阅读:
- Download the Android SDK
- Android Development Tutorial – Froyo
- Android ADB USB Driver for Windows
- Android Debug Bridge on HTC Desire
- Developing on a Device
- Android Developers
- Develop Android applications with Eclipse
- Windows 下 Android 开发平台搭建方法
- 谷歌 Android 手机应用开发环境的搭建
- Android 开发环境搭建全程演示(jdk+eclipse+android sdk)
- Installing the SDK
- Build a mobile RSS reader
- 深入探讨 Android 传感器
- http://www.anddev.org/

近期评论