0

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 ?

Community
  • 1
  • 1
Kh5
  • 167
  • 2
  • 10

1 Answers1

1

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.

Royg
  • 1,665
  • 1
  • 13
  • 20