Add Google Maven repository and sync project

用Android studio导入一个项目时,可以会报
Add Google Maven repository and sync project
有可能的解决方法如下:
在项目的build.gradle中修改如下:

buildscript {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        //jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        //jcenter()
    }
}

 


当然报这个错有可能修改这里还没有好,但是哥这次修改这样就好了,哈哈
————————————————
版权声明:本文为CSDN博主「无风之翼」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/peachs885090/article/details/103048555

posted @ 2020-07-10 18:01  大厨无盐煮  阅读(3074)  评论(0编辑  收藏  举报