Android Studio配置国内镜像

1、依赖下载问题 修改项目根目录下build.gradle

buildscript {
    repositories {
        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' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
    }
}
 
allprojects {
    repositories {
        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' }
    }
}

2、针对sdk下载更新问题 可以如图参考设置下

1480950-a7e6c2c41e6e81e5.png

网上找的几个镜像地址

东软信息学院
mirrors.neusoft.edu.cn 端口:80
北京化工大学
ubuntu.buct.edu.cn/ubuntu.buct.cn 端口:80
中国科学院开源协会
mirrors.opencas.cn (mirrors.opencas.org/mirrors.opencas.ac.cn) 端口:80
上海GDG镜像服务器
sdk.gdgshanghai.com 端口:8000
电子科技大学
mirrors.dormforce.net 端口:80

转载于:https://www.jianshu.com/p/0d9f5d1447db

猜你喜欢

转载自blog.csdn.net/weixin_33847182/article/details/91148914