【问题标题】:Failed to resolve Android Giphy SDK dependency无法解决 Android Giphy SDK 依赖
【发布时间】:2018-07-05 11:32:14
【问题描述】:

我正在尝试在我的 Android 项目中添加 Giphy Android SDK。在Giphy SDK's documentation 上,提到在您的项目 gradle.build 文件中,添加:

repositories {
    maven {
        url  "https://giphy.bintray.com/giphy-sdk"
    }
}

并在你模块的 gradle.build 文件中添加:

compile('com.giphy.sdk:core:1.0.0@aar') {
    transitive=true
}

但是当我同步它时,Android Studio 给我一个错误说:

Failed to resolve: com.giphy.sdk:core:1.0.0

有人知道我错过了什么吗?

【问题讨论】:

  • 您找到解决方案了吗?如果是,请与我们分享您的答案。谢谢!

标签: android dependencies giphy giphy-api


【解决方案1】:

确保添加以下行

repositories {
    maven {
        url  "https://giphy.bintray.com/giphy-sdk"
    }
}

allprojects 下,而不是在buildscript 下,就像这样

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://giphy.bintray.com/giphy-sdk"
        }
    }
}

【讨论】:

    猜你喜欢
    • 2021-01-04
    • 2019-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-09
    • 2017-01-06
    相关资源
    最近更新 更多