AS : Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.

今天更新了下grade,突然跳出来:

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

解决方法:

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

buildscript {
    
    repositories {
        mavenCentral()
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }
}

猜你喜欢

转载自blog.csdn.net/liu362732346/article/details/84785859