Android SDK download and update solutions fail! ! !

Android development environment to build a start time, download the SDK always following error:

  1. Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml.  
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml.

It is said dl-ssl.google.com in mainland China is strong, really great heavenly people live, the solution is to modify the C: \ Windows \ System32 \ drivers \ etc \ hosts file. Add the line:

  1. 74.125.237.1       dl-ssl.google.com  
74.125.237.1       dl-ssl.google.com

It should be noted that the hosts file is read-only, we do not have permission to modify, we need to copy the hosts file to your desktop or elsewhere, and then modify the code as follows:

  1. # Copyright (c) 1993-2009 Microsoft Corp.  
  2. #  
  3. # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.  
  4. #  
  5. # This file contains the mappings of IP addresses to host names. Each  
  6. # entry should be kept on an individual line. The IP address should  
  7. # be placed in the first column followed by the corresponding host name.  
  8. # The IP address and the host name should be separated by at least one  
  9. # space.  
  10. #  
  11. # Additionally, comments (such as these) may be inserted on individual  
  12. # lines or following the machine name denoted by a '#' symbol.  
  13. #  
  14. # For example:  
  15. #  
  16. #      102.54.94.97     rhino.acme.com          # source server  
  17. #       38.25.63.10     x.acme.com              # x client host  
  18.   
  19. # localhost name resolution is handled within DNS itself.  
  20. #   127.0.0.1       localhost  
  21. #   ::1             localhost  
  22. // pro, is to increase this one oh  
  23. 74.125.237.1       dl-ssl.google.com  
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of 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 be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
//亲,就是增加这一句哦
74.125.237.1       dl-ssl.google.com
Then save, copy the modified hosts file to C: \ Windows \ System32 \ drivers \ etc directory, replace the file just fine! ! ! Download the SDK again we will succeed it, as shown below:

Hey, it's done it! ! !

PS: complemented in mac or Linux, the location where the hosts file is / etc / hosts , you can use sudo vim / etc / hosts for editing.

Reproduced in: https: //my.oschina.net/cjkall/blog/195921

Guess you like

Origin blog.csdn.net/weixin_33674976/article/details/91756501