2016-11-19 31 views
0

我在Android Studio中构建了一个具有gradle的android应用程序,并且我有一个依赖关系jackson-databind,但是我得到一个错误can't resolve xxx,即使我使用了我的私人回购,并且我确定该库在那里。无法使用mavenCentral解析gradle库

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' 
} 

而且我得到一个错误。 enter image description here

+0

请同时发布整个bulid.gradle文件 –

+0

嗨,user1434702其在我的项目中的工作,因此尝试清理您的项目,然后再试一次 –

回答

1

更新我的gradle这个3.2和它工作得很好。

相关问题