包上传了Bintray但Gradle分辨率失败

问题描述 投票:0回答:2

我在Bintray存储库上有一个上传的软件包,你可以看到here

  • Here是我的库模块build.gradle文件
  • Here是我的deploy.gradle文件
  • Here是我的deploy.properties文件

问题是我无法用标准的compile 'com.frlgrd:animated-edit-text:0.3@aar'解决依赖问题。我的库包含资源,这就是为什么我需要@aar后缀。

编译使用依赖项的“test”项目时出现此错误:

Failed to resolve: com.frlgrd:animated-edit-text:0.3

在这个项目中,我有这个root build.gradle文件

buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
android maven gradle bintray jcenter
2个回答
0
投票

我无法使用标准编译'com.frlgrd:animated-edit-text:0.3@aar'来解决依赖关系。我的库包含资源,这就是我需要@aar后缀的原因。

使用工件表示法(如@aar)意味着您只想下载aar工件,并且没有依赖项,因为忽略了现有的模块描述符。

在你的情况下,你不需要aar表示法,因为在jcenter repo中你只有aar文件(它与资源无关)

在任何情况下,如果要下载依赖项,请使用@aar表示法,您应该添加transitive=true

compile('xxxxxx@aar') {
    transitive = true;
}

0
投票

在Bintray上,在包页面中,有一个“添加到jcenter”按钮。我没有在开始时看到它,但后来,我做了,我点击了它,等了几个小时来解决我的问题.Add to jcenter button (lost around flashy green elements, it should be more visible according to me)

© www.soinside.com 2019 - 2024. All rights reserved.