1. The solution for Android studio cannot be upgraded online
Check Update一直提示Connection failed. Please check your network
connection and try again
In the AS installation directory E:\Program Files\Android Studio\bin,
Open studio.vmoptions/studio64.vmoptions or studio.exe.vmoptions/studio64.exe.vmoptions with an editor , and add the following content to the file:
-Djava.net.preferIPv4Stack=true
-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/
After saving, reopen Android Studio and click Check Update to pop up an update information prompt.
AS only has the Download option after checking the update, but there is no Update and restart (I guess the span of the version update is relatively large, I want to
directly change from 2.1 to 2.3, and there are two major versions in the middle), it needs to be incremented Update, and it is an incremental update of a version. For example, I cannot directly download the incremental jar package from 2.1 to 2.3.
Download of incremental packages
View your own build version number (eg 143.2821654) through AS's Help->About.
View the build version number corresponding to each AS version
Download the incremental update package
https://dl.google.com/android/studio/patches/AI-FROM −TO-patch-win.jar, where FROM is the installed version number; TO is the latest version number;
Download address:
https://dl.google.com/android/studio/patches/AI-141.2272828-173.4670197-patch-win.jar
Install the update package
Copy the downloaded update package to the Android Studio installation directory
Open a command line prompt and change to the directory where Android Studio is installed
java -classpath [incremental package storage path + incremental package file name] com.intellij.updater.Runner install .
Note: spaces and the last dot
java -classpath AI-141.2288178-145.3537739-patch-win.jar com.intellij.updater.Runner install .
The last dot "." represents the current installation to the current directory. After the installation is complete, you can restart Android Studio, and then Help->about view the current version
Unable to download incremental package, 404 error: Because the version span is too large, it needs to be downloaded in multiple segments. For details, please refer to the version indicated by the from tag in https://dl.google.com/android/studio/patches/updates.xml
; After downloading, it cannot be decompressed, and it is prompted to be locked by JAVA: Reason, the JAR file is placed in the wrong location, and it should be placed in the same directory as Android Studio;
key content
If the corresponding incremental package cannot be found, only the corresponding version can be downloaded:
https: //developer.android.google.cn/studio/index.html
http://www.android-studio.org/
Prompt after Android Studio is installed and started
Reason : After installing AS for the first time, it is detected that the computer has no SDK.
Workaround :1. Click Cancel, and specify the SDK local path in the subsequent interface
. 2. Set the first time to open the AS without downloading the sdkIn the installation directory of this Android studio, find the following file
\bin\idea.properties
Set to open AS for the first time without detecting the SDK. Open it with Notepad and add a line at the end of the file:
disable.android.first.run=true
Android uses domestic mirror to update SDK online
Since Google servers cannot be accessed normally in mainland China, the Android SDK cannot be updated normally, which brings a lot of inconvenience to Android developers.
- Modify the hosts file
When using the Android SDK Manager, it is mainly connected to two addresses, dl.google.com and dl-ssl.google.com. The key finds that these two addresses cannot be accessed normally. How to solve it? By modifying the hosts file, we can direct the above address to a Google server that can be accessed normally. We can use webmaster tools super ping to find available IPs.
Open the address: http://ping.chinaz.com/ , test the IP addresses of dl.google.com and dl-ssl.google.com respectively, and write the obtained IP into C:\Windows\System32\drivers\etc \hosts file.
dl-ssl.google.com 无法ping通,dl.google.com可ping通
- Use domestic mirror sources
Recommend a few here:
mirrors.neusoft.edu.cn //Neusoft Institute of Information
ubuntu.buct.edu.cn/ubuntu.buct.cn //Beijing University of Chemical Technology
mirrors.opencas.cn (mirrors.opencas.org/mirrors .opencas.ac.cn) //Chinese Academy of Sciences Open Source Association
sdk.gdgshanghai.com Port: 8000 //Shanghai GDG mirror server
mirrors.dormforce.net //(Dongli Unlimited) University of Electronic Science and Technology of China
Among them , the University of Electronic Science and Technology of China is strongly recommended Mirror source!
For more addresses, refer to this blog
https://blog.csdn.net/wuqilianga/article/details/78540473
Start the Android SDK Manager, open the main interface, select "Tools", "Options..." in turn, and the "Android SDK Manager - Settings" window will pop up;
in the "Android SDK Manager - Settings" window, in "HTTP Proxy Server" and "HTTP Proxy Server" Fill in mirrors.neusoft.edu.cn and 80 in the "Proxy Port" input box, and check the "Force https://… sources to be fetched using http://…" check box.
After the setting is completed, click the "Close" button to close the "Android SDK Manager - Settings" window and return to the main interface;
- Domestic Google server IP address
Go to http://ping.chinaz.com/ and enter g.cn
Then query the fastest node and copy the IP address. Such as: IP: 203.208.41.87 Response time: 9 milliseconds
Open SDK Manager in Android Studio, click the red box pointed by the arrow
In SDK Manager, select Tools->Options, paste the IP address in HTTP Proxy Server, such as the previous IP: 203.208.41.87, and then fill in the port number in HTTP Proxy Port 80, and check the "Forcus https://..." option.
Then you can click install packges to download.
Is it fast? If not, please try another IP. . .