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
Like a noob!
I was getting a nightmare with this and forgot that i've recently installed a new AV (Kaspersky)
So another solution is: Disable your AV or add exclusions to your AV firewall or proxy
hope it helps to save some time.
Run bellow command in Android studio terminal after opening the same project. It worked for me.
On Windows:
gradlew cleanBuildCache
On Mac or Linux:
./gradlew cleanBuildCache
This problem might be due to some restricted internet connections... If you are installing build tools on some restricted network, the required certificates might not install... So try changing the network connection.... Worked for me.....
I had the same problem. I fixed it by removing/commenting proxy settings in gradle.properties. Check your gradle.properties, if you have some like this
systemProp.https.proxyPort=8080
systemProp.http.proxyHost=192.168.1.1
systemProp.https.proxyHost=192.168.1.1
systemProp.http.proxyPort=8080
comment it with #. Which will look like this
#systemProp.https.proxyPort=8080
#systemProp.http.proxyHost=192.168.1.1
#systemProp.https.proxyHost=192.168.1.1
#systemProp.http.proxyPort=8080