简体   繁体   English

无法解决Bintray依赖性

[英]Failed to resolve Bintray dependency

I've created a maven repository on https://bintray.com named it "maven", and I've added an aar library to it. 我在https://bintray.com上创建了一个名为“ maven”的maven存储库,并向其中添加了一个aar库。 But Android Studio can't build the project because: 但是Android Studio无法构建该项目,因为:

Failed to resolve: com.danileron

The most confusing thing about it, is that if I reduce library version from: 最令人困惑的是,如果我减少以下版本的库版本:

implementation 'com.danileron.sdk:test_sdk:1.0.1'

to: 至:

implementation 'com.danileron.sdk:test_sdk:1.0.0'

Android Studio will warn me that : Android Studio会警告我:

A newer version of com.danileron.sdk:test_sdk than 1.0.0 is available: 1.0.1

So, it knows about the library but when I build project it can't resolve it? 因此,它了解该库,但是当我构建项目时无法解决它?

Project's build.gradle: 项目的build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
        maven {
            url  "https://webbey.bintray.com/maven"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'


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

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

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

webbey is organisation in this case 在这种情况下,webbey是组织的

There are two issues in this question. 这个问题有两个问题。

  1. The .pom file version was 1.0.0 and not 1.0.1, this gave the warning. .pom文件版本为1.0.0,而不是1.0.1,这发出了警告。
  2. The .arr file wasn't located with the .pom file. .arr文件与.pom文件不在一起。 The maven-metadata.xml held only the .pom and not the actual artifact, so the dependency couldn't be resolved. maven-metadata.xml.pom而不保存实际的工件,因此无法解决依赖关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM