When dealing with overseas versions, we often encounter the problem that the remote warehouse cannot be loaded, which is caused by network problems. Or, the company's operation and maintenance builds a ladder that can climb over the wall, or other methods to avoid restrictions.
Another way is to find the corresponding ip of the website and configure it in the host to bypass the restriction.
1. Find the IP address corresponding to the domain name
For example, in https://ping.chinaz.com/
the web page, enter dl.google.com
, to perform ip query, as shown in the figure below:
Next, check whether the ip address is available, by pinging ip:
2. Perform global replacement in host :
Open as an administrator C:\Windows\System32\drivers\etc\hosts
Here it is recommended to use notepad++ to open hosts, enter
220.181.174.161 dl.google.com
To save, the following prompt box will pop up:
Click to open as an administrator, then ctrl+s to save.
After a short operation, you can refresh the gradle again through the studio to load the remote warehouse.