I have created a new project in android studio 3.0.1 setup the proxy settings of company and added the self sighned certificate unser server sertificates. When I try to build the following error is listed and the build fails.
Error:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0. Could not resolve com.android.support:appcompat-v7:26.1.0. Required by: project :app > Could not resolve com.android.support:appcompat-v7:26.1.0. > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'. > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.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 > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target > unable to find valid certification path to requested target
Could somebody help me?
Advertisement
Answer
Solved this by adding the self signed certificate of my company to the cacerts file of Android Studio. The cacerts file is located here: C:Program FilesAndroidAndroid Studiojrejrelibsecuritycacerts
I have also added the proxy details for http/https to gradle.properties.