Out-Of-Box Android Studio fails for server certs

I have no reason to think this is a defect. But I am unable to resolve the situation.

To replicate:

  1. Install Android Studio
  2. Accept various certs
  3. start a new app project selecting defaults
  4. wait for sync to fail

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘My Application’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10.
Required by:
project :
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10.
Could not get resource ‘https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.10/kotlin-gradle-plugin-1.4.10.pom’.
Could not GET ‘https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.10/kotlin-gradle-plugin-1.4.10.pom’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The above mentioned links resolve and download from chrome directly.

What I have tried:

  1. The exact same process on a Windows 10 VM, and it worked. Did not request certs. Worked.
  2. Removing every trace of Gradle, Java, JRE, JDK, Android Studio, etc. from machine and re-installing
  3. Adding certs to cacerts file from command line.
  4. Adding certs to cacerts from within Android Studio. File->Settings->Tools->Server Certificates

Not using a proxy. Not using windows firewall.

Thank you.

I hope my post did not lack decorum or that I’m in entirely the wrong place for this question. I would add that I’ve done about 6 hours of google-fu on this error and still haven’t turned up any kind of solution.

Thank you for your patience.

On windows I had success with a similar problem by altering the cacerts file.

Logged in as an admin I used this command
'.\Android\Android Studio\jre\bin\keytool.exe' -importcert -file path\To\Proxy\Cert\proxy.crt -alias your-alias -keystore '.\Android\Android Studio\jre\jre\lib\security\cacerts' -storepass changeit