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