2

I got the following Error in android Studio 3.0,when I sync gradle.

Gradle 'Projectname' project refresh failed.

Error:Cause: unable to find valid certification path to requested target

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Janjir Patel
  • 21
  • 1
  • 6

2 Answers2

5

Delete jcenter() and Change The Repositories in the build.gradle file to the following format:

repositories {
    maven {
        url "http://jcenter.bintray.com"
    }
}
Ruckus T-Boom
  • 4,566
  • 1
  • 28
  • 42
Haileapp
  • 755
  • 7
  • 20
0

I had faced exact same issue to my existing projects after upgrading Android Studio 3.0.
I was able to resolve it with changing gradle script like below.

build.gradle

buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:**3.0.0**'
    }
}

gradle-wrapper.properties

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

I hope this is helpful for you

Note: My Android Studio info

Android Studio 3.0
Build #AI-171.4408382, built on October 21, 2017
JRE: 1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1