我是一个新的bie Android工作室 . 这是构建Android应用程序的绝佳工具 . 但我遇到了一些问题 . 那就是:当我在build.gradle中添加依赖项时,“
buildscript {
repositories {
jcenter(){
url "http://jcenter.bintray.com/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.gms:google-services:1.5.0-beta2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
app build.gradle中的依赖项 .
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
/* Firebase SDK */
compile 'com.firebase:firebase-client-android:2.4.0'
/* Firebase UI */
compile 'com.firebaseui:firebase-ui:0.2.2'
/* For Google Play Services */
compile 'com.google.android.gms:play-services-safetynet:8.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
}
"
我收到了消息“
Error:A problem occurred configuring project ':app'.
> Could not download jackson-databind.jar (com.fasterxml.jackson.core:jackson-databind:2.2.2)
> Could not get resource 'https://jcenter.bintray.com/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.jar'.
> Could not GET 'https://jcenter.bintray.com/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.jar'.
> peer not authenticated
"
但是当我贴上链接'https://jcenter.bintray.com/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.jar ' on web browser I can download jackson-databind-2.2.2.jar. I don' t知道为什么android studio 'Could not get resource ' https://jcenter.bintray.com/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.jar' .
你能解释一下并帮我解决吗?
1 回答
下载jackson-databind-2.2.2.jar
将其复制到app / libs
在jackson-databind-2.2.2.jar上单击鼠标右键,然后选择"Add as library"
最后,您可以在项目中使用jackson-databind-2.2.2.jar .