Android 開(kāi)發(fā)環(huán)境需要:Eclipse,Java環(huán)境,ADT,android SDK。 每個(gè)軟件的下載地址,及詳細的安裝過(guò)程,可以參考網(wǎng)上各種文章。
我之前安裝過(guò)Android開(kāi)發(fā)環(huán)境,因為在安裝Android SDK的時(shí)候出錯,以為是GWF問(wèn)題,而且因為當時(shí)有其它事情,就沒(méi)有去查原因,今天,為了做個(gè)簡(jiǎn)單的程序,再次安裝,遇到如下幾個(gè)問(wèn)題:
- 使用https下載出錯
運行“SDK Setup.exe”,提示:“Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.”
按照提示, 在settings中,勾選“Force https://… sources to be fetched using http://…”,強制使用http協(xié)議,解決了問(wèn)題。 - A folder failed to be renamed or moved
網(wǎng)速特別忙,等啊等,終于下載完了,在安裝的過(guò)程中提示:“-= Warning ! =-
A folder failed to be renamed or moved. On Windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software .) ………”。 意思說(shuō),將殺毒軟件及使用“/Android SDK/tools”目錄的相關(guān)程序關(guān)掉。
我將 MaAfee殺毒軟件及防火墻關(guān)掉,將windows 文件瀏覽器也都關(guān)掉了,進(jìn)程中可能存在的“adb.exe”進(jìn)程也關(guān)掉了,甚至機器都重啟了好幾次,都提示相同的錯誤。
無(wú)可奈何,只有“/Android SDK/tools”自己可能使用這個(gè)目錄了,難道是我win7 64位系統有這個(gè)問(wèn)題? 痛苦中…….,安裝程序是否可以不使用“/Android SDK/tools”?我最后,沒(méi)有再使用自動(dòng)安裝程序,從https://dl-ssl.google.com/android/repository/repository.xml提取出非linux及非macosx下的zip文件,見(jiàn)如下地址:
下面的6個(gè)文件,解壓縮到:/Android SDK/platform/下面
https://dl-ssl.google.com/android/repository/android-1.1_r1-windows.zip
https://dl-ssl.google.com/android/repository/android-1.5_r03-windows.zip
https://dl-ssl.google.com/android/repository/android-2.0_r01-windows.zip
https://dl-ssl.google.com/android/repository/android-2.0.1_r01-windows.zip
https://dl-ssl.google.com/android/repository/android-1.6_r02-windows.zip
https://dl-ssl.google.com/android/repository/android-2.1_r01-windows.zip
如下文件解壓縮到:/Android SDK/tools/下面
https://dl-ssl.google.com/android/repository/tools_r05-windows.zip
如下文件解壓縮到:/Android SDK/usb_driver/下面
https://dl-ssl.google.com/android/repository/usb_driver_r03-windows.zip
如下文件解壓縮到:/Android SDK/add-ons/下面
https://dl-ssl.google.com/android/repository/google_apis-3-r03.zip
https://dl-ssl.google.com/android/repository/google_apis-4_r02.zip
https://dl-ssl.google.com/android/repository/google_apis-5_r01.zip
https://dl-ssl.google.com/android/repository/google_apis-6_r01.zip
https://dl-ssl.google.com/android/repository/google_apis-7_r01.zip
解壓后,即完成安裝。
- emulator: ERROR: unknown virtual device name: ‘****’
在運行程序, 在手機模擬器中查看結果的時(shí)候,發(fā)現如下錯誤:
emulator: ERROR: unknown virtual device name: ’****’
emulator: could not find virtual device named ’****’
具體原因,是因為我修改了用戶(hù)文檔目錄,修改到了F盤(pán)目錄下。 我將“F:\Users\賬號\”下面的“.android”復制一份到到“C:\Users\ 賬號\”下即可。
附帶兩張運行成功效果圖:
附加:對于第二個(gè)問(wèn)題,我搜到了一個(gè)解決方法,如下:
I had the same problem: the latest update failed to install because it couldn'trename the tools folder in android-sdk-windows. I'm using Avira antivirus anddisabling it didn't help, but I don't think it had anything to do with the AV programanyway.Fact is, running the Android SDK setup apparently uses items in the"android-sdk-windows\tools" directory. I'm on Win 7 x64 so maybe that causes someunique situation - I'm not sure.Solution:- I made a copy of the tools folder itself (keeping it at the same directory treelevel, thus "tools" and "tools-copy" were both in the "android-sdk-windows" folder).- I ran Android.bat from that copy- I ran the update without problems (it updated the original,not-being-used-at-the-moment tools folder, among whatever other items it needed to).- I closed the SDK, deleted the folder (I had to kill the adb.exe process first - notsure why that always persists but you can't delete the folder without doing that).- I restarted the SDK from the normal (now-updated) tools folder. Worked like a charm!Note that simply killing adb.exe was NOT sufficient to get around the originalissue... only by copying the tools folder and using the copy to run Android for theduration of the update process was enough to rectify the problem.I hope this helps others... it's quite vexing to have to spend time resolving basicissues like this just to run an update.
最后,十分感謝GWF,并沒(méi)有將的所有的相關(guān)網(wǎng)址都屏蔽掉,知道我還是搜索到了很多有用的信息!



