Android Studio / Intellij, Gradle Error:Cause: peer not authenticated

后端 未结 9 606
忘掉有多难
忘掉有多难 2020-12-08 17:06

Having a fight with IntelliJ at the moment. The darn thing won\'t download Gradle 2.1

I have an Android project hosted on GitHub, which I have cloned to my laptop.

相关标签:
9条回答
  • 2020-12-08 17:44

    Change your repositories syntax in build.gradle as following. See following question.

    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
    }
    
    0 讨论(0)
  • 2020-12-08 17:46

    yeah I experienced exactly same situation It is not easy, but now I'm clear

    I changed the build.gradle located in project forlder, not in app folder

    I changed as below

    repositories {
        jcenter 
        { 
            url 'http://jcenter.bintray.com' 
        } 
    }
    

    instead of

    repositories {
        jacenter()
    }
    
    0 讨论(0)
  • 2020-12-08 17:46

    in case when there are some problems with internet try to add a line

    54.231.14.232 s3.amazonaws.com
    

    to your /etc/hosts (..\Windows\System32\drivers\etc\hosts)

    0 讨论(0)
  • 2020-12-08 17:48

    "Error:Cause: peer not authenticated."

    As this occurs I using Ubuntu: When I changed version on android studio 2.0 9 preview beta 1.

    How do I fix my gradle.

    Simply created a new project in android studio and then went in and saw build.grandle version gradle in my case:  

     dependencies {
             classpath 'com.android.tools.build:gradle:2.0.0-beta1'
         }
    

    and replace in my project.

    I hope it helps others.

    0 讨论(0)
  • 2020-12-08 17:51

    you should import the certificate:

    First of all download the certificate (.cer) from this url, Help is here

    Copy it to the path JDK_HOME/jre/lib/security

    Then with command prompt targeted to above location, run the following command:

    keytool -import -alias git -file <cert_file_name_you_exported.cer> -keystore cacerts -storepass changeit
    

    Type yes if it prompts for approval, after that open the desired IDEA and have fun :)

    If this doesn't help, try importing the certificate to JRE/lib/security/cacerts, It's totally depend on the build path of the IDEA you are using

    0 讨论(0)
  • 2020-12-08 17:55

    Like BzH :

    This is a Java SSL connection error I solved on Github here.

    You need to add the appropriate SSL certificate to the java keystore for java accept the connection.

    Work fine :)

    0 讨论(0)
提交回复
热议问题