android studio 3.6. 1 Import Project Error Prompt Unable to Download classpath
- 2021-12-04 11:11:23
- OfStack
Error reporting:
Caused by: org. gradle. api. internal. artifacts. ivyservice. DefaultLenientConfiguration $ArtifactResolveException: Could not resolve all artifacts for configuration ': classpath'.
Reason:
Baidu said it could not download the content in classpath, but the details are not very clear
Solution:
Baidu has come to many methods, which can't be solved by a single attempt, and then combine the solutions
In build. gradle
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
}
}
allprojects {
repositories {
google()
maven { url 'https://maven.google.com' }
jcenter()
}
}
Then go to gradle\ wrapper\ gradle-wrapper.properties and replace distributionUrl with your local one.
Summarize