I got the following Error in android Studio 2.2.3 when I sync gradle.
Error:Cause: unable to find valid certification path to requested target
For me this worked:
buildscript {
repositories {
maven { url "http://jcenter.bintray.com"}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
...
}
allprojects {
repositories {
mavenCentral()
jcenter{ url "http://jcenter.bintray.com/" }
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
If you are running behind a corporate proxy with SSL interception, you will need to follow these steps to trust your proxy certificate for HTTPS:
Most of the times when I face this issue. I remove replace https
with http
. It solves the issue.
I have faced this problem with Maven build earlier. It was occurring because I was working in a restricted office network. You need to import required certificate in your keystore.
Follow Steps in the answer of below question "unable to find valid certification path to requested target", but browser says it's OK
(use double quotes for fienames/pathnames)
Note: I am not able to find now exact source from where I solved problem, if I get it, I will update it
Just try to build the same project through command prompt and if the download dependencies happen successfully, go to settings in you IntelliJ and map the gradle to point gradle in your system and build should happen fine.
Import your company certificate at Tools->Android->SDK Manager->Tools->Server Certificates