user1434702
user1434702

Reputation: 829

Cannot resolve library in gradle with mavenCentral

I am building a android application with gradle in Android Studio, and i have a dependency jackson-databind, but i get a error can't resolve xxx, even i use my private repo and i sure that library is there.

apply plugin: 'com.android.application'

repositories {
    mavenCentral()
}
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:recyclerview-v7:25.0.0'
    compile 'com.android.support:cardview-v7:25.0.0'
    compile 'com.fasterxml.jackson.core:jackson-core:2.8.1'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.8.1'
    testCompile 'junit:junit:4.12'
}

And i get a error. enter image description here

Upvotes: 0

Views: 538

Answers (2)

user1434702
user1434702

Reputation: 829

I update my gradle to 3.2 and it work well.

Upvotes: 1

Daveak
Daveak

Reputation: 3

Sounds like you may just need to sync your build.gradle file, click the "Sync Now" like in this image here: https://postimg.org/image/v0yro39cl/

Upvotes: 0

Related Questions