Error:Could not resolve all depe

2021-10-25  本文已影响0人  Dazzzzzzzzzzzz

在项目的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
}
上一篇下一篇

猜你喜欢

热点阅读