I am getting a build error “ERROR: Cause: unable to find valid certification path to requested target”. I have deleted the expired certificates from the settings->certificate page. Also, I have updated the gradle build with maven { url “http://jcenter.bintray.com”}. I am still getting the build error. Please help in fixing the same. I followed the resolution provided in the Error:Cause: unable to find valid certification path to requested target , but no luck.
Gradle.build file :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url "http://jcenter.bintray.com"}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
//jcenter()
mavenCentral()
jcenter{ url "http://jcenter.bintray.com/" }
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Build Error :
org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'My Application'.
at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:99)
at org.gradle.initialization.exception.DefaultExceptionAnalyser.collectFailures(DefaultExceptionAnalyser.java:62)
at org.gradle.initialization.exception.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47)
......
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
... 83 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
... 83 more