ADT下载地址:http://dl.google.com/android/ADT-20.0.3.zip 有关ADT的介绍及安装环境要求:http://developer.android.com/tools/sdk/eclipse-adt.html 我安装ADT前的环境为 Win7+JDK 1.6+Eclipse 4.2 ADT是Eclipse用来开发Android应用程序的一个插件,关于如何具体搭建一个安卓的开发环境,我就不多说了,想知道的朋友在网上查询一下即可。 在Eclipse中如何安装ADT,安卓官方已经说得很清楚了,在此我将它的原文给拷贝了过来,稍微有点英语基础的人,认真看看,应该可以看得懂的,在重要的地方我进行了注释,以方便不懂英文的童鞋。
Installing the Eclipse Plugin
Android offers a custom plugin for the Eclipse IDE, called AndroidDevelopment Tools (ADT). This plugin is designed to give you a powerful, integratedenvironment in which to develop Android apps. It extends the capabilitiesof Eclipse to let you quickly set up new Android projects, build an appUI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.
If you will be developing in Eclipse with the ADT Plugin, first make sure that you have asuitable version of Eclipseinstalled on your computer as described by thesystem requirements.
If you need to install Eclipse, you can download it from http://www.eclipse.org/downloads/.We recommend the "Eclipse Classic" version. Otherwise, you should use a Java orRCP version of Eclipse.
Note: If you prefer to work in a different IDE, you do not need toinstall Eclipse or ADT. Instead, you can directly use the SDK tools to build anddebug your application. So if you're not using Eclipse, continue to the next page by clickingthe Next link on the right.
Download the ADT Plugin //下载ADT插件,你可以让Eclipse帮你下载ADT,也可以自己下载ADT插件
//以下这种安装ADT插件的方式就是让Eclipse帮你下载ADT,然后安装ADT,网上 有很多介绍ADT的安装方法,用的就是
//这种方法,刚开始我装ADT时用的也是这种方法,不过我安装失败了,如果网络不好的话,建议不要用这种方法,
//我比较推荐使用第二种安装方法,即先用迅雷下载ADT插件,然后再用Eclipse安装,该方法请见文章的后半部分。
- Start Eclipse, then select Help > Install NewSoftware.
- //启动Eclipse,在菜单栏选择Help-->在弹出来的菜单中选择Install NewSoftWare
- Click Add, in the top-right corner.
- //选择Install NewSoftWare后,在弹出的对话框中,在右上角点Add按钮
- In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and thefollowing URL for theLocation:
https://dl-ssl.google.com/android/eclipse/
- //在Add Repository对话框中,在Name栏输入 ADT Plugin,在Location栏输入网址:
//https://dl-ssl.google.com/android/eclipse/
- Click OK. If you have trouble acquiring the plugin, try using "http" in the Location URL,instead of "https" (https is preferred for security reasons).
- //点OK后,如果你在安装ADT插件时遇到错误,请将以上网址中的https该为http
- In the Available Software dialog, select the checkbox next to Developer Tools and clickNext.
- //在可用软件的对话框中,选择Developer Tools前的复选框,然后点下一步
- 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. If you get a security warning saying that the authenticity or validity ofthe software can't be established, clickOK.
- //阅读和接受许可协议,然后点Finish,如果弹出安全警告,点OK即可
- When the installation completes, restart Eclipse.
- //安装完成时,重启Eclipse
Configure the ADT Plugin
Once Eclipse restarts, you must specify the location of your Android SDK directory:
- In the "Welcome to Android Development" window that appears, select Useexisting SDKs.
- Browse and select the location of the Android SDK directory you recentlydownloaded.
- Click Next.
If you haven't encountered any errors, you're done setting up ADT and can continue toNext Steps.
Updating the ADT Plugin
From time to time, a new revision of the ADT Plugin becomes available, withnew features and bug fixes. Generally, when a new revision of ADT is available,you should update to it as soon as convenient.
In some cases, a new revision of ADT will have a dependency on a specificrevision of the Android SDK Tools. If such dependencies exist, you will need toupdate the SDK Tools package of the SDK after installing the new revision ofADT. To update the SDK Tools package, use the Android SDK Manager, asdescribed in Exploring the SDK.
To learn about new features of each ADT revision and also any dependencies onthe SDK Tools, see the listings in theRevisionssection. To determine the version currently installed, open theEclipse Installed Software window usingHelp> Software Updates and refer to the version listed for"Android Development Tools".
Follow the steps below to check whether an update is available and, if so,to install it.
- Select Help > Check for Updates. If there are no updates available, a dialog will say so and you're done.
- If there are updates available, select Android DDMS, Android Development Tools, and Android Hierarchy Viewer, then clickNext.
- In the Update Details dialog, click Next.
- Read and accept the license agreement and then click Finish. This will download and install the latest version of Android DDMS and Android Development Tools.
- Restart Eclipse.
If you encounter problems during the update, remove the existing ADT plugin from Eclipse, thenperform a fresh installation, using the instructions forInstalling the ADTPlugin.
Troubleshooting
If you are having trouble downloading the ADT plugin after following thesteps above, here are some suggestions:
- If Eclipse can not find the remote update site containing the ADT plugin,try changing the remote site URL to use http, rather than https. That is, setthe Location for the remote site to:
http://dl-ssl.google.com/android/eclipse/
- If you are behind a firewall (such as a corporate firewall), make sure thatyou have properly configured your proxy settings in Eclipse. In Eclipse,you can configure proxy information from the main Eclipse menu inWindow (on Mac OS X,Eclipse) >Preferences > General >NetworkConnections.
//当用以上那种方式安装不了ADT时,我们可以用下面这种方式,
//我就是根据下面这种方式自己下载ADT,然后安装成功的
If you are still unable to use Eclipse to download the ADT plugin as aremote update site, you can download the ADT zip file to your local machine andmanually install it:
- Download the ADT Plugin zip file (do not unpack it): //这是官方给出的ADT下载地址,需要的朋友上其官方查看即可
Package | Size | MD5 Checksum |
12390954 bytes | 869a536b1c56d0cd920ed9ae259ae619 |
- Start Eclipse, then select Help > Install NewSoftware. //安装方法跟上面的大同小异,不再敖述
- Click Add, in the top-right corner.
- In the Add Repository dialog, click Archive.
- Select the downloaded ADT-20.0.3.zip file and click OK.
- Enter "ADT Plugin" for the name and click OK.
- 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. If you get a security warning saying that the authenticity or validity ofthe software can't be established, clickOK.
- When the installation completes, restart Eclipse.
To update your plugin once you've installed using the zip file, you will haveto follow these steps again instead of the default update instructions.
Other install errors
Note that there are features of ADT that require some optionalEclipse packages (for example, WST). If you encounter an error wheninstalling ADT, your Eclipse installion might not include these packages.For information about how to quickly add the necessary packages to yourEclipse installation, see the troubleshooting topicADTInstallation Error: "requires plug-in org.eclipse.wst.sse.ui".
For Linux users
If you encounter this error when installing the ADT Plugin for Eclipse:
An error occurred during provisioning.
Cannot connect to keystore.
JKS
...then your development machine lacks a suitable Java VM. Installing SunJava 6 will resolve this issue and you can then reinstall the ADTPlugin.