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()
    }
}

当然报这个错有可能修改这里还没有好,但是哥这次修改这样就好了,哈哈

你可能感兴趣的:(技术文档,android,studio,google,maven,sync,project)