When starting to build an Android development environment, the following error will always appear in the Download SDK:
[Java]View Plaincopy
- Failed to fetch URL http: //dl-ssl.google.com/android/repository/addons_list-1.xml.
It is said that dl-ssl.google.com in the mainland was strong, the great heavenly Kingdom is really not let people live, the solution is to modify the C:\Windows\System32\drivers\etc\hosts file. Add a line:
[Java]View Plaincopy
- 74.125 . 237.1 dl-ssl.google.com
Note here is that the Hosts file is read-only, we do not have permission to modify, we need to copy the Hosts file to the desktop or other places, and then modify the code as follows:
[Java]View Plaincopy
- # copyright (c) 1993 2009 microsoft corp.
- #
- # This is a sample hosts file used by microsoft tcp/ip for windows.
- #
- # This file contains the mappings for IP addresses to host names. each
- # entry should be kept on an individual line. The IP address should
- # be placed in the first column followed by the corresponding host name.
- # The IP address and the host name should is separated by at least one
- # space.
- #
- # Additionally, comments (such as these) may is inserted on individual
- # lines or following the machine name denoted by a ' # '
- #
- # For example:
- #
- # 102.54 9 4.97 rhino.acme.com # source server
- # 38.25 6 3.10 x.acme.com # x client host
- # localhost name resolution is handled within DNS itself.
- # 127.0 0 .1 localhost
- # ::1 localhost
- //Pro, is to add this sentence oh
- 74.125 2 37.1 dl-ssl.google.com
- 203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
then save, copy the modified Hosts file toC:\Windows\System32\drivers\etcdirectory, replace the file is good!!! We will be successful when we download the SDK again, such as:
Hey, it's done!!!
PS: added, in Mac or Linux, the Hosts file is located in /etc/hostsand can be edited using sudo vim/etc/hosts .
Android SDK download and update failure resolution