更新android SDK的问题

    由于我大天朝将google屏蔽的原因,在更新android SDK的时候,可能速度慢还是个小问题,重要的是你更新的时候出各种错误,比如错误  Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml, reason: File not found,在网上搜罗了一圈,发现有一种解决办法如下:
① 改hosts文件的方法,更新速度较快,Windows在C:\WINDOWS\system32\drivers\etc目录下,Linux用户打开/etc/hosts文件。

② 打开文件后添加以下内容
#Google主页
203.208.46.146  www.google.com
#这行是为了方便打开Android开发官网 现在好像不FQ也可以打开
74.125.113.121  developer.android.com
#更新的内容从以下地址下载
203.208.46.146  dl.google.com
203.208.46.146  dl-ssl.google.com

③ 如果此种方法解决不了问题的话,那么可以试试一个老外的方法:
Question:
Step 1: Run /usr/android-sdk-linux_x86/tools/android
Step 2: Click "Available Packages"
Step 3: Click "Third Party Add-ons"
Receive this error message:
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml, reason: File not found

Answer:
I now spent two hours on this issue
* I have no proxy in my system
* I forced 'http' insteas of 'https'
* I deactivated my virus scanner
* I even deactivated Windows firewall
Nothing helped!
Then I had an idea, I am using Windows 7. So if you are using Windows 7 and you have installed android-sdk under 'C:\Programs' then you have to run the sdk as 
administrator!
Windows Start --> Programs --> android --> android-sdk --> right mouse click --> run as administrator.
This helped, now I am able to install new packages. 


你可能感兴趣的:(android,sdk)