Situation :
(1) I am on Android Studio 4.1 and trying to build a sample Android Application
(2) I am behind the Proxy and Proxy settings working fine as I am able to download and install SDKs
I am getting the below error : I tried all possible steps adding the certificates using keytool.exe
eg : keytool.exe -import -trustcacerts -alias androidstudiocerts -file dlgooglecom.cer -keystore "C:\Program Files\Android\Android Studio\jre\jre\lib\security\cacerts"
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 all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:4.1.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.1.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I wanted to know :
(1) In the Android Studio Settings we have an option for http then why it is taking "https" to probe the site?Why not http?
(2) SDK Manager works fine for downloading the sdks and related build tools.
(3) tried with 5-6 differernt gradle:4.X.X. versions , no effect
(3) There are several JAVA (one from android studio, another from Oracle JAVA : Program Files\Java\jdk-15.0.1) and I have added the certificates to both C:\Program Files\Android\Android Studio\jre\jre\lib\security\ as well as C:\Program Files\Java\jdk-15.0.1\lib\security but still the sam error
(4) Already restarted the PC and invalidated cache and Android Studio Restart - No effect
(5) Which Software part is throwing this error? JAVA or Android Studio or something else?
(6)Is there any other location where I can get the full detailed logs of this error?
And most important :
(7) How to fix this now?