In my react native app, I'm getting following build failed error after running npm run-android command.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':react-native-screens'.
> Could not resolve all artifacts for configuration ':react-native-screens:classpath'.
> Could not resolve com.android.tools.build:gradle:4.2.2.
Required by:
project :react-native-screens
> Could not resolve com.android.tools.build:gradle:4.2.2.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Can anyone help me to solve this issue?