Angular1+cordova+ionic project failed to build with the below error "FAILURE: Build failed with an exception."

20 Views Asked by At

I am trying to build an old angular+ionic+cordova project which was working fine since last week. Now its throwing me below error

Cause: unable to find valid certification path to requested target

  • What went wrong: Could not resolve all files for configuration ':debugCompileClasspath'.

Could not resolve com.android.support:appcompat-v7:27.1.1. Required by: project : Could not resolve com.android.support:appcompat-v7:27.1.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.pom'. > Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.pom'. > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find vali d certification path to requested target

I tried to add the certificate inside JRE/security/cacert file by using below command "keytool -import -alias example -keystore "C:\Program Files\Java\jre1.8.0_331\lib\security\cacerts" -file rootCertFile.der" and I am getting this "Trust this certificate? [no]: y Certificate was added to keystore keytool error: java.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_331\lib\security\cacerts (Access is denied)"

Please help me to build my program which was running fine 5 days back.

0

There are 0 best solutions below