Couldnt resolve the gradle sync ERROR: Cause: unable to find valid certification path to requested target

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

Hi @rbeatajane,

Your build needs to use HTTPS instead of HTTP in your repositories blocks.

JCenter dropped support for HTTP on January 13th, 2020.

You can read more about it here:
https://medium.com/@jonathan.leitschuh/update-want-to-take-over-the-java-ecosystem-all-you-need-is-a-mitm-d069d253fe23?source=friends_link&sk=8c8e52a7d57b98d0b7e541665688b454