问题描述:
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ‘:classpath’.
推测原因:
有一个压缩包没有下载好。
最终我的gradle内容
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenLocal()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url'https://maven.aliyun.com/repository/public/' }
maven { url'https://maven.aliyun.com/repository/google/' }
maven { url'https://maven.aliyun.com/repository/jcenter/' }
maven { url'https://maven.aliyun.com/repository/central/' }
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven { url 'https://maven.google.com' }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
上图是最终调好时候各个部分的状态。这次我是连线下载的。
版权声明:本文为qq_38346355原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。