一、修改/etc/hosts访问dl-ssl.google.com
如果按照官方的步骤去使用Android SDK,在国内环境会出现:
Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Connection timed out: connect
但是ping是正常的:
PING dl-ssl.google.com (74.125.237.1) 56(84) bytes of data.
64 bytes from dl-ssl.google.com (74.125.237.1): icmp_seq=1 ttl=46 time=199 ms
则修改hosts,即可正常:
sudo gedit /etc/hosts
在文件开头添加:
74.125.237.1 dl-ssl.google.com
即可正常。
二、下载package时会出现:
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Connect to dl-ssl.google.com/dl-ssl.google.com/74.125.237.1 timed out 的错误。
解决办法如下:
|
|