Solution to the problem that SDK cannot be updated


Problem Description

I believe that everyone will encounter the problem of not being able to update when updating the SDK, and cannot open Google search. This is because China has blocked Google, so either only You can access it through a VPN proxy or change the HOSTS, and update the SDK! This section introduces two methods to update the SDK!


1. Modify the hosts file

There are a lot of "Google hosts 2015" directly on Baidu, and the one I commonly use is: google hosts 2015, continuously updated - 360 Knowledge After entering the libraryCopy all the content under the dividing line:

复制内容

Then open this path on the computer:

hosts路径

Open it with Notepad and paste the copied content!

Then enter: https://www.google.com.hk/

Appearance: 谷歌搜索 indicates that the Hosts modification is successful

Then open Under sdk settings:

此处输入图片的描述

Then you will magically find that the SDK can be updated, and you can also access Google, but it’s a bit slow, right? Let’s introduce it again A way to update the SDK, much faster!


2. Use domestic mirror server to update

Do you still remember that I introduced you to AndroidDevTools, which is essential for Android development? Open this website, we can see

Next we just need to select any of the above, then open our Android SDK Manager, and then make the following settings: Tools - > Option, fill in the address and port number of the mirror source, check Force https://Use HTTPS protocol

then close , you will go to the main interface, select Packages -> Reload, and you can see that the progress bar is moving. We can also choose the corresponding version of the SDK to download, and the speed is very fast~

3. Summary of this section

This section introduces two solutions to the problem that the SDK cannot be updated. Changing hosts is troublesome, and you may need to update every few days. If you just want to update the sdk, it is recommended to use domestic mirrors to update!