I have uploaded library to bintray, but when I try to use it in my project gradle build fails with Error:(26, 13) Failed to resolve: com.ymirski.library:date-utils:0.0.1
Here is my app build.gradle dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.ymirski.library:date-utils:0.0.1'
}
project build.gradle:
allprojects {
repositories {
jcenter()
maven {
url "http://droidlab.bintray.com/maven"
}
}
}
I think you didn't publish your library correctly. If you specify the dependency in Gradle like you did, it expects to find a JAR file, not an AAR file. If Gradle supports depending on AAR files (I don't do Android development), you probably have to explicitly state that you want the AAR by using
compile 'com.ymirski.library:date-utils:0.0.1@aar'
. But even with that, it does not work, which makes me think that you didn't do the publishing on Bintray correctly. But as I'm also not familiar with Bintray, I cannot tell you what is wrong exactly.