1

I have an android library uses a module on jitpack, so I change my gradle.build

apply plugin: 'com.android.library'

repositories {
    mavenCentral()
    // jitpack maven
    maven {
        url "https://jitpack.io"
    }
}

...

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.3.0'
    // this is the library 
    compile 'com.github.ybq:Android-SpinKit:1.0.4'
}

But gradle still can't resolve this library

Error:Failed to resolve: com.github.ybq:Android-SpinKit:1.0.4

Did I missed something ?

Xeijp
  • 853
  • 1
  • 7
  • 18

2 Answers2

0

A simple answer is that this library is not available in the gradle. Kindly recheck if you are spelling this dependency correctly. This library might be removed by the provider so its not working.

Awais Ahmad
  • 427
  • 3
  • 17
  • I can build the android library independently, just can't build it with android application project. – Xeijp May 11 '16 at 08:04
  • @Xeijp What do you mean with "can't build it with android application project". How do you include the library in your app? – Gabriele Mariotti May 11 '16 at 10:10
0

Works fine here.

Try running with -i or -d to get more information about what is happening.

Or maybe now it works and it was a temporary problem? If so, try running with --refresh-dependencies which makes Gradle forget about whether a repository has a dependency or not and requeries it.

Vampire
  • 35,631
  • 4
  • 76
  • 102