Android peer not authenticated

2019-01-22 22:08发布

Everything has been working, only today i started to get an error message, and i can't even "Sync Project with Gradle files" from Android Studio. The only thing i have changed was ... the office :D

Error:A problem occurred configuring project ':app'. Could not download library.jar (com.mcxiaoke.volley:library:1.0.16) Could not GET 'https://jcenter.bintray.com/com/mcxiaoke/volley/library/1.0.16/library-1.0.16.jar'. peer not authenticated

And my 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.+'
    }
}
....

gradle-wrapper.properties:

distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip

I also tried with http instead of https, but still the same problem.

Does anyone have similar problem?

7条回答
对你真心纯属浪费
2楼-- · 2019-01-22 22:51

It seems a temporary issue with jcenter with an invalid SSL.

You can switch to mavenCentral repo in your build.gradle file.

repositories {
     mavenLocal()
     mavenCentral()
}
查看更多
登录 后发表回答