Android同行未经过身份验证

Bug*_*0id 11 android android-studio android-gradle-plugin

一切都在工作,只有今天我才开始收到错误消息,我甚至无法从Android Studio"与Gradle文件同步项目".我唯一改变的是......办公室:D

错误:配置项目':app'时出现问题.无法下载library.jar(com.mcxiaoke.volley:library:1.0.16)无法获取' https://jcenter.bintray.com/com/mcxiaoke/volley/library/1.0.16/library-1.0.16 .jar '.peer未经过身份验证

还有我的build.grade

buildscript {
    repositories {
        jcenter()
        maven { url 'http://download.crashlytics.com/maven'}
        maven { url 'http://dl.bintray.com/amulyakhare/maven'}
    }

    dependencies {
        classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
    }
}
....
Run Code Online (Sandbox Code Playgroud)

gradle-wrapper.properties:

distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip
Run Code Online (Sandbox Code Playgroud)

我也试过用http而不是https,但仍然是同样的问题.

有没有人有类似的问题?

Mar*_*szS 18

临时解决方案

将其添加到build.gradle

repositories {
    mavenLocal()
    maven {
        name "jcenter"
        url "http://jcenter.bintray.com/"
    }
}
Run Code Online (Sandbox Code Playgroud)

  • 救了我的一天!谢谢! (2认同)

Gab*_*tti 7

jcenter使用无效的SSL 似乎是一个临时问题.

您可以切换到文件中的mavenCentralrepo build.gradle.

repositories {
     mavenLocal()
     mavenCentral()
}
Run Code Online (Sandbox Code Playgroud)