Android peer not authenticated

后端 未结 7 537
轻奢々
轻奢々 2020-12-14 23:03

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 ch

相关标签:
7条回答
  • 2020-12-14 23:09

    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()
    }
    
    0 讨论(0)
  • 2020-12-14 23:10

    The issue occurs when cacerts file gets messed up. After attempting all solutions that I found on the Internet, I could finally resolve this by reinstalling java.

    0 讨论(0)
  • 2020-12-14 23:24

    Add these properties to your gradle home directory in a new gradle.properties file

    systemProp.https.proxyHost=[your proxy https host IP or DNS name]
    systemProp.https.proxyPort=[your proxy https port, usually 8080]
    systemProp.http.proxyHost=[your proxy http host IP or DNS name]
    systemProp.http.proxyPort=[your proxy http port, usually 8080]
    

    OSX: /users/yourusername/.gradle/gradle.properties

    Windows: C:\Users\yourusername.gradle\gradle.properties

    Then, restart Android Studio and open your project.

    Note: I used the same values for HTTP and HTTPS, they could be different from yours.

    0 讨论(0)
  • 2020-12-14 23:26

    I had this error and it was happening because of a VPN proxy issue. I disabled my VPN and everything worked fine after. I used this command (on a Mac):

    sudo /opt/cisco/anyconnect/bin/acwebsecagent -disablesvc -websecurity
    
    0 讨论(0)
  • 2020-12-14 23:31

    changing the version of the jdk to the latest version worked for me (Oracle Java 8). This question shows you how to do this on android studio: How to specify the JDK version in android studio?

    0 讨论(0)
  • 2020-12-14 23:34

    I tried with all the above solutions didn't work, this once helped me lot with latest studio 2.2 preview 7. Make the changes in build.gradle of root project:

        allprojects {
        repositories {
            jcenter {
                url "http://jcenter.bintray.com/"    
                    }
    
           }
    }
    
    0 讨论(0)
提交回复
热议问题