gradle 修改国内仓库

 

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

 

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一致

 

 

参考地址:https://www.csdn.net/tags/NtDacgysNzE0OC1ibG9n.html

posted @ 2022-07-31 23:44  菜小鱼~  阅读(631)  评论(0编辑  收藏  举报