Android Studio Gradle build failed. Error:Cause: peer not authenticated

前端 未结 23 1801
离开以前
离开以前 2020-12-03 04:54

I have already created one project and gradle sync worked successfully.

When I try to create another project it fails and gives the error message that



        
相关标签:
23条回答
  • 2020-12-03 05:14

    please change the gradle build tools version first. You need to update the build tools version. Still not working, create a new project and check the gradle file details. 1.5.0 is the latest version I have installed.

     classpath 'com.android.tools.build:gradle:1.5.0'
    
    0 讨论(0)
  • 2020-12-03 05:15

    May be sometimes your app use Crashlytic bundle in your graddle And your network cannot resolve Crashlytic library. In another way, may be others lib can cause problem. Please check your internet can access and grep those libs.

    So it return an error that

    "Error:Cause: peer not authenticated."

    For me, I solve this problem by comment code that evolved crashlytics lib all and compile again ---> this problem drain my working time to 4 hrs to know and clear it.

    T ^ T

    Wish all of us safe from this problem.

    0 讨论(0)
  • 2020-12-03 05:16

    After meddling with it, and following Schizo's answer (you should follow it also), and it not working. I realized Android Studio was using java-7-openjdk but I added a certificate to java-8-openjdk, so it didn't work until I changed it to the openJDK 8 in Project Structure, so be sure that you check that also, in case it's not working for you.

    0 讨论(0)
  • 2020-12-03 05:16

    There is one more small change can help you in

    gradle-wrapper.properties

    Change

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

    To

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

    Sync the project once you did the change

    0 讨论(0)
  • In my case I had to download the latest Java SDK and then change the JDK location in the project to the downloaded JDK. Apparently something was wrong with the current JDK (had some warning from my virus scanner about this)

    0 讨论(0)
  • 2020-12-03 05:16

    Update your gradle to the latest version . It works perfectly .

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

    I hope it helps.

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