About Location of the android sdk has not been setup in the preferences

来源:互联网 发布:windows ctypes64 编辑:程序博客网 时间:2024/05/16 09:59
打开eclipse时出现无法识别android的项目,即所有android项目均显示红色错误标记。点击eclipse管理android SDK and AVD Manager 插件的标志时出现错误:
location of the android sdk has not been setup in the preferences
如图1
About Location of the android sdk has not been setup in the preferencesX

图1 location of the android sdk has not been setup in the preferences
点击eclipse->Window->Preferences出现了如下错误:Could not find D:\android-sdk\tools\adb.exe!
如图2
About Location of the android sdk has not been setup in the preferences
图2 Could not find D:\android-sdk\tools\adb.exe!
在android sdk 目录(D:\android-sdk)下,确实找不到adb.exe文件。才想起了原来之前曾经用eclipse 管理插件更新过android sdk,但没有成功,最后连相关的adb文件都丢失。既然是an droid sdk的版本问题,更新应该就是了。但由于eclipse插件已经无法识别android sdk,所有只能进入android sdk 的安装目录(D:\android-sdk),找到SDK Manager.exe文件,双击弹出如下界面(图3):
About Location of the android sdk has not been setup in the preferences
图3 Choose Packages to Install 选择相应的android sdk进行安装
安装 新的SDK
About Location of the android sdk has not been setup in the preferences
图4 安装新的sdk版本
点击安装android完成以后,还需要进行对eclipse关于android 管理插件的更新,否则即使安装了新版本的android SDK,由于新版本的android sdk 目录结构与就版本有所不同,而旧的eclipse 旧的android管理插件因无法识别而报错。
更新android管理插件的办法:eclipse ->Help->Install New Software,选择Android – Android –https://dl-ssl.google.com/android/eclipse/(原来的安装插件的链接),如图5
接下来的步骤就是安装,步骤省略。
About Location of the android sdk has not been setup in the preferences
图5 更eclipse android管理插件
更新完成后,重启eclipse ,再看看android都安装了哪些sdk。如图6
About Location of the android sdk has not been setup in the preferences
图6 更新后的android sdk各版本。
顺便说一句,要更新android的最新版本,最好用android目录的SDK Manager.exe。
0 0
原创粉丝点击