[英]Cannot resolve library in gradle with mavenCentral
我正在用Android Studio中的gradle構建一個android應用程序,並且我有一個依賴jackson-databind
,但是我得到了一個can't resolve xxx
的錯誤,即使我使用了我的私有倉庫並且我也確定該庫在那里。
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'
}
我將gradle更新為3.2,它運行良好。
聽起來您可能只需要同步build.gradle文件,請單擊此圖像中的“立即同步”,如下所示: https ://postimg.org/image/v0yro39cl/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.