**could not resolve all dependencies for configuration ‘:classpath’.**估计是dependices的gradle和gradle-wrapper.properites的版本不对应
build.gradle
//注意第三个是https!
buildscript {
ext.kotlin_version = ‘1.7.10’
repositories {
maven{url’https://maven.aliyun.com/repository/google’}
maven{url’https://maven.aliyun.com/repository/jcenter’}
maven{url’https://maven.aliyun.com/nexus/content/groups/public’}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
maven{url’https://maven.aliyun.com/repository/google’}
maven{url’https://maven.aliyun.com/repository/jcenter’}
maven{url’https://maven.aliyun.com/nexus/content/groups/public’}
}
}
rootProject.buildDir = ‘…/build’
subprojects {
project.buildDir = “
r
o
o
t
P
r
o
j
e
c
t
.
b
u
i
l
d
D
i
r
/
{rootProject.buildDir}/
rootProject.buildDir/{project.name}”
}
subprojects {
project.evaluationDependsOn(‘:app’)
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle-wrapper.properties
distributionUrl=file:///C:/Users/***/Downloads/gradle-7.5-all.zip
参考:
https://blog.csdn.net/qq_34777982/article/details/108810701