Adding a trusted cert to your cacerts keystore. Helps if you see an error that looks like this when trying to download some 3rd party dependencies for Android dev Unable to find valid certification path to requested target

  1. Download KeyStore Explorer https://keystore-explorer.org/downloads.html
  2. Use KeyStore Explorer to open cacerts in the jre your AndroidStudio is configured to use. I’m using the packaged instance so I’m looking in /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/jre/lib/securityThe password for this is “changeit
  3.  Go to the offending host (bintray.com, jitpack.io, etc…) and export the cert.
  4. Back in Keystore Explorer tlick the “Import Trusted Certificate” icon and find the cert you just exported.
  5. Save the cacerts keystore and restart Android.

chrisriver