Android Studio domestic image source configuration

Android Studio domestic image source configuration

Android Studio is a widely used integrated development environment (IDE) for developing Android applications. When accessing the official website and downloading dependent libraries in China, you may encounter slow network access speeds. To solve this problem, we can configure Android Studio to use domestic mirror sources to increase download speed. This article will guide you how to configure the domestic image source of Android Studio.

First, open Android Studio and click "File" -> "Settings" in the menu bar to open the settings panel.

In the settings panel, find "Build, Execution, Deployment" -> "Gradle" -> "Android Studio". In the right pane, you will see the "Gradle VM options" field. Add the following code in this field:

-Dhttps.proxyHost=mirrors.neusoft.edu.cn -Dhttps.proxyPort=80

This code will set the proxy host and port. "mirrors.neusoft.edu.cn" is a commonly used domestic mirror source. If you want to use another mirror source, you can replace it with the mirror source of your choice.

Next, in the settings panel, find "Build, Execution, Deployment" -> "Gradle" -> "Global Gradle settings".

In the right pane, find the "Service directory path" field and click the folder icon on the right. This will open a file browser window.

In the file browser window, you will see a file named "gradle.properties". Right-click the file and select "Edit" to open it.

In the opened file, add the following code:

Guess you like

Origin blog.csdn.net/NoerrorCode/article/details/132400130