Kh5
Kh5

Reputation: 163

Error if lib fetched from Bintray repo but not when fetched from Jcenter

I make android libraries and I noticed that when I fetch the package from my maven repository on Bintray account, an error occurs.

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve net.mysite.lib_package:version

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve net.mysite.lib_package:version

The way I add my repo to Gradle is:

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

The problem does not show up when I fetch from Jcenter. I checked other libraries of mine and other random libraries as well and the problem occurs only when fetching from user's Bintray Maven repo.

What am I missing ?

Upvotes: 0

Views: 35

Answers (1)

Royg
Royg

Reputation: 1685

Your URL is incorrect. You should use the https://dl.bintray.com/[YOUR_USERNAME]/<REPOSITORY_NAME>.

Example:

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

Check this wiki for Maven Repositories & Resolving Artifacts.

Upvotes: 1

Related Questions