Android(安卓)SDK与ADT版本不匹配的解决
打开eclipse时出现无法识别android的项目,即所有android项目均显示红色错误标记。点击菜单Window的Android Virtual Device Manager 插件的标志时出现了Location of the Android SDK has not been setup in the preferences. 如下图所示:
单击“OK”按钮,会出现如下对话框(没有的话,选择eclipse菜单Window的Preferences):
SDK Location设置正确后,仍然有“This Android SDK requires Android Developer Toolkit version 23.0.0 or above. Current version is 22.6.2.v201403212031-1085508. Please update ADT to the latest version.”的错误提示,这是因为SDK与ADT版本不匹配导致AVD打不开造成的。SDK更新后,adt-bundle安装目录\sdk\tools\lib\plugin.prop文件的内容变为“# begin plugin.propplugin.version=23.0.0# end plugin.prop”,而Eclipse在查看该文件时,查找到plugin.version=23.0.0,认为当前的sdk需要23.0.0版本以上的插件,但我们还是以前旧的22.6.2插件。
解决方法有两种:
解决方法一:降低SDK版本
将plugin.version的版本信息改为旧版本的版本号,诸如22.6.2,保存,重启Eclipse。
解决方法二:升级ADT版本
1.在线升级
途径一:设置好正确的SDK Location后,重启Eclipse时,一般情况下应该会出现如下提示升级的窗口,单击“Check for Updates”升级;
途径二:选择Eclipse菜单Help -> Check for Updates 升级。
由于某些原因,谷歌的服务器总是很难连接的上的,所以如上两种方式有可能最终出现如下失败的提示,如何解决我也还没找到,知道的朋友还请告诉我一下哦。
2.离线升级(其实这个服务器一样也是很难连接得上,反正我失败了,但网上总有热心的人乐于分享)
下载ADThttp://developer.android.com/intl/zh-CN/sdk/installing/installing-adt.html#Download
下载之后不要解压(其实官网上已经有说明了),步骤如下:
-
- StartEclipse, then selectHelp>Install New Software.
- ClickAdd, in the top-right corner.
- In the Add Repository dialog, clickArchive.
- Select the downloaded ADT-23.0.0.zip file and clickOK.
- Enter “ADT Plugin” for the name and clickOK.
- 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 clickFinish.
If you get a security warning saying that the authenticity or validity of the software can’t be established, clickOK.
-
- When the installation completes, restartEclipse.
更多相关文章
- AS插件-Android(安卓)Layout ID Converter
- ButterKnife 8.8.1版本在AndroidStudio中的配置(附Android(安卓)s
- android中DownloadManager实现版本更新,监听下载进度实例
- Kotlin Android(安卓)Extensions的使用
- java.util.zip.ZipException: duplicate entry(重复依赖多版本的
- 编译Android源码时出现的java版本的问题
- mac下搭建cocos2d-x2.2.1版本android编译环境教程
- 原生Android应用中内嵌RN
- Android(安卓)repo/git server 建立过程