Cordova build android - Error

Hi Team ,

We are getting the below certificate error after removing all proxy from corporate network .

To resolving this we downloaded certificate from browser and installed using keytool .

Please let me know any solution ASAP, still we are facing the same issue to build android .

Thank you in advance :slight_smile: .

Error :

Task :CordovaLib:checkDebugManifest UP-TO-DATE
Task :CordovaLib:processDebugManifest UP-TO-DATE
Task :app:preDebugBuild
FAILURE: Build failed with an exception.

  • What went wrong:
    FAILED
    Could not resolve all files for configuration β€˜:app:debugCompileClasspath’.

Could not resolve com.android.support:support-v4:26.+.
Required by:
project :app
Failed to list versions for com.android.support:support-v4.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
Could not GET β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failed to list versions for com.android.support:support-v4.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
Could not GET β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failed to list versions for com.android.support:support-v4.
Unable to load Maven meta-data from https://maven.localytics.com/public/com/android/support/support-v4/maven-metadata.xml.
Could not get resource β€˜https://maven.localytics.com/public/com/android/support/support-v4/maven-metadata.xml’.
Could not GET β€˜https://maven.localytics.com/public/com/android/support/support-v4/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failed to list versions for com.android.support:support-v4.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
Could not GET β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failed to list versions for com.android.support:support-v4.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
Could not GET β€˜https://repo.maven.apache.org/maven2/com/android/support/support-v4/maven-metadata.xml’.
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 com.android.support:appcompat-v7:26.+.
Required by:
project :app
Failed to list versions for com.android.support:appcompat-v7.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml’.
Could not GET β€˜https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failed to list versions for com.android.support:appcompat-v7.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml’.3 actionable tasks: 1 executed, 2 up-to-date

        > Could not GET 'https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml'.
           > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Failed to list versions for com.android.support:appcompat-v7.
Unable to load Maven meta-data from https://maven.localytics.com/public/com/android/support/appcompat-v7/maven-metadata.xml.
Could not get resource β€˜https://maven.localytics.com/public/com/android/support/appcompat-v7/maven-metadata.xml’.
Could not GET β€˜https://maven.localytics.com/public/com/android/support/appcompat-v7/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failed to list versions for com.android.support:appcompat-v7.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml’.
Could not GET β€˜https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failed to list versions for com.android.support:appcompat-v7.
Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml.
Could not get resource β€˜https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml’.
Could not GET β€˜https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/maven-metadata.xml’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org