'Could not resolve all artifacts for configuration ':segment_analytics-react-native:classpath'

A problem occurred configuring project ':segment_analytics-react-native'.

Could not resolve all artifacts for configuration ':segment_analytics-react-native:classpath'. Could not resolve com.android.tools.build:gradle:3.1.4. Required by: project :segment_analytics-react-native > Could not resolve com.android.tools.build:gradle:3.1.4. > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'. > Could not HEAD 'https://maven.google.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'. > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other p rotocols to be used. See: https://docs.gradle.org/7.2/userguide/build_environment.html#gradle_system_properties > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin d 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

BUILD FAILED in 30s

at makeError (D:\test_app\node_modules\execa\index.js:174:9)
at D:\test_app\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (D:\test_app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\test_app\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:192:9)

info Run CLI with --verbose flag for more details.

can someone suggest a way to resolve this issue?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source