报错信息:
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ‘:classpath’.
解决:
修改build.gradle
buildscript {
repositories {
google()
jcenter()
}
}
allprojects {
repositories {
google()
jcenter()
}
}
为
buildscript {
repositories {
google()
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
jcenter()
}
}
allprojects {
repositories {
google()
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
jcenter()
}
}
然后同步项目
截止有必要的话清理缓存并重启AS