本文介绍开发Android应用的基础知识。包括如果下载,安装,eclipse的配置,ADT的升级与配置等。
第一步,要开发Android应用,首先需要下载SDK,地址为:http://developer.android.com/sdk/index.html
第二步,下载并安装Eclpise,注意版本问题,Android3.1版本开发需要eclipse3.5以上版本支持。下载地址为:http://www.eclipse.org/downloads/
第三步,下载并安装 Android Development Tools(ADT) Plugin for Eclipse
- Start Eclipse, then select Help > Install NewSoftware....
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and thefollowing 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).
- In the Available Software dialog, select the checkbox next to Developer Tools and clickNext.
- In the next window, you'll see a list of the tools to be downloaded. ClickNext.
- Read and accept the license agreements, then click Finish.
Note: If you get a security warning saying that the authenticity or validity ofthe software can't be established, click OK.
- When the installation completes, restart Eclipse.
第四步:配置ADT Plugin
After you've successfully downloaded the ADT as described above, the next stepis to modify your ADT preferences in Eclipse to point to the Android SDK directory:
- Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
- Select Android from the left panel.
You may see a dialog asking whether you want to send usage statistics to Google. If so,make your choice and click Proceed. You cannot continue with this procedure untilyou click Proceed.
- For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
- Click Apply, then OK.
Done! If you haven't encountered any problems, then the installation iscomplete. If you're installing the Android SDK for the first time, return to Installing the SDK to complete your setup.