47.关于android studio 导入依赖,总是失败的问题

你可以在project的build.gradle中添加一行:

maven { url "https://jitpack.io" }

例如:

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        

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

allprojects {
    repositories {
        google()
        jcenter()
//---------------------------------------在这里加上--------------------------------------------------
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

//----------------------------------------------------------------------------完--------------------------------------------------------------------

猜你喜欢

转载自blog.csdn.net/weixin_42061754/article/details/82055046