Error:Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'

在项目的build.gradle 的buildscript 和 allprojects同时加上了 mavenCentral() google() 即可

// Top-level build file where you can add configuration options common to all sub-projects/modules.
 
buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
 
allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}
 
task clean(type: Delete) {
    delete rootProject.buildDir
}

你可能感兴趣的:(Error:Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath')