无法解析Android依赖项'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'

时间:2020-09-17 22:35:10

标签: android-studio gradle android-gradle-plugin dependencies

当我尝试在Android项目中声明依赖com.github.ViksaaSkool:AwesomeSplash:v1.0.0时,出现以下错误

Failed to resolve: 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'

https://i.stack.imgur.com/pF93x.png

1 个答案:

答案 0 :(得分:0)

maven { url 'https://www.jitpack.io'} 添加到build.gradle(project)中,如下所示:

// Top-level build file where you can add configuration options common to all sub- 
projects/modules.
buildscript {
repositories {
    google()
    jcenter()
}
dependencies {
    classpath "com.android.tools.build:gradle:4.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://www.jitpack.io'}
}
}

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

对我有用。