location of the android sdk has not been setup in the preferences

location of the android sdk has not been setup in the preferences

location of the android sdk has not been setup in the preferences

androidandroid sdk 版本出錯eclipse 無法使用android sdk

打開eclipse時出現無法識別android的項目,即所有android項目均顯示紅色錯誤標記。點擊eclipse管理android SDK and AVD Manager 插件的標誌時出現錯誤:

location of the android sdk has not been setup in the preferences

如圖-1

圖-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

圖-2 Could not find D:\android-sdk\tools\adb.exe!

在android sdk 目錄(D:\android-sdk)下,確實找不到adb.exe文件。纔想起了原來之前曾經用eclipse 管理插件更新過android sdk,但沒有成功,最後連相關的adb文件都丟失。既然是android sdk的版本問題,更新應該就是了。但由於eclipse插件已經無法識別android sdk,所有隻能進入android sdk 的安裝目錄(D:\android-sdk),找到SDK Manager.exe文件,雙擊彈出如下界面(圖-3):

圖-3 Choose Packages to Install 選擇相應的android sdk進行安裝

安裝 新的SDK

圖-4 安裝新的sdk版本

點擊安裝android完成以後,還需要進行對eclipse關於android 管理插件的更新,否則即使安裝了新版本的android SDK,由於新版本的android sdk 目錄結構與就版本有所不同,而舊的eclipse 舊的android管理插件因無法識別而報錯。

更新android管理插件的辦法:eclipse ->Help->Install New Software,選擇Android – Android – http://dl-ssl.google.com/Android/eclipse/(原來的安裝插件的鏈接),如圖-5

接下來的步驟就是安裝,步驟省略。

圖-5 更eclipse android管理插件

更新完成後,重啓eclipse ,再看看android都安裝了哪些sdk。如圖-6

圖-6 更新後的android sdk各版本。

順便說一句,要更新android的最新版本,最好用android目錄的SDK Manager.exe。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章