Android Studio is my learning Android development on the road of a stumbling block, create a new project, a line of code did not move directly translated it up, why this article refers to the North called, because I too hard
This article explains how to smooth the years 9102 to use in the domestic network is not open case Android Studio
1. Turn off the proxy
Internet can search the pile to make the SDK download speed quickly by increasing domestic mirroring station agent, but I can not take a recommended not to use a proxy
2. change hosts
dl.google.com
Unable to resolve the DNS, which is leading to many problems culprit, by manually increasing the domain name and ip mapping in hosts in to solve this problem
In [] ping the server multiple sites - Site speed - Master Tools find a minimum energy in the machine to ping ip delay added to the hosts in the machine
3. Android SDK
After the front are configured, you can direct online download the Android SDK
4. Gradle
4.1 aliyun of maven repository
Modify the Project build.gradle
file
repositories {
// 添加阿里云 maven 地址
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
google()
// jcenter()
}
allprojects {
repositories {
// 添加阿里云 maven 地址
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
google()
// jcenter()
}
}
4.2 In the C:\Users\{用户名}\.gradle\gradle.properties
file if you set the global proxy also commented gradle
# systemProp.http.proxyHost=mirrors.neusoft.edu.cn
# systemProp.http.proxyPort=80
Do not waste time on the IDE filled pit