【问题标题】:Failed to resolve: com.github.ozodrukh:CircularReveal:1.1.0无法解决:com.github.ozodrukh:CircularReveal:1.1.0
【发布时间】:2015-07-02 08:50:14
【问题描述】:

我正在尝试将此库 (https://github.com/ozodrukh/CircularReveal) 导入我的项目,方法是:compile 'com.github.ozodrukh:CircularReveal:1.1.0@aar'

但我收到此错误:

Error:(25, 13) Failed to resolve: com.github.ozodrukh:CircularReveal:1.1.0
<a href="openFile">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

我不明白为什么,因为我以这种方式成功导入了其他库。

【问题讨论】:

  • 它使用的是 jitpack.io 而不是 maven central(或)jcentre。你添加了那行吗?

标签: android android-library circularreveal


【解决方案1】:

在存储库的 Github 页面上:

此库未在 Maven Central 中发布,但您可以使用 捷特包。添加远程maven url:

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

您是否可能忘记将其添加到您的 gradle 文件中?

【讨论】:

    【解决方案2】:

    你应该先在 build.gradle(app:module) 中添加存储库,然后是依赖项,就像这样:

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

    }

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:24.2.1'
        compile 'com.android.support:support-v4:24.2.1'
        compile ('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
            transitive = true;
        }
    }
    

    好的,你可以的,希望对你有帮助!

    【讨论】:

      猜你喜欢
      • 2021-12-07
      • 2019-05-11
      • 1970-01-01
      • 2018-07-17
      • 2020-01-17
      • 2018-09-25
      • 2018-02-08
      • 1970-01-01
      • 2020-01-31
      相关资源
      最近更新 更多