gradle 修改国内仓库

小黑Neo

关注

阅读 59

2022-08-11

 

使用默认的国外仓库下载较慢,修改成国内仓库下载较快

 

MAC:

在 /Users/xxxxx/.gradle 目录下新建文件 init.gradle,内容如下:



allprojects {

repositories {

maven {

//允许使用外部库

allowInsecureProtocol = true

//阿里云镜像

url "http://maven.aliyun.com/nexus/content/groups/public"

}

}

}


windows ,在C:\Users\用户\.gradle ,操作和MAC一致


精彩评论(0)

0 0 举报