I have been struggling with this error for a long time and still could not find a solution to it. I have installed android studio 4 on Ubuntu 16.04.6 LTS. I am connected to the internet behind a proxy. I googgled it and set the configuration, but with no luck.
Any help is appricated. Find below the error exception.
Thank you in advance.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'RALAPP5'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:2.3.3.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:2.3.3.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'.
> 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.tools.build:gradle:2.3.3.
> Could not get resource 'http://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'.
> Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'. Received status code 403 from server: Forbidden
Could not resolve com.google.gms:google-services:3.0.0.
Required by:
project :
> Could not resolve com.google.gms:google-services:3.0.0.
> Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'.
> 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.google.gms:google-services:3.0.0.
> Could not get resource 'http://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'.
> Could not GET 'http://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'. Received status code 403 from server: Forbidden
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'RALAPP5'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
at
Get more help at https://help.gradle.org
BUILD FAILED in 876ms
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
Related
I created a Kotlin application according to JetBrains's tutorial in the following link. But I encountered the build failed error. what is wrong?
https://www.jetbrains.com/help/idea/create-your-first-kotlin-app.html?section=Gradle%20Groovy
These are my screenshots:
and the entire build log is:
Starting Gradle Daemon...
Gradle Daemon started in 1 s 83 ms
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'hello'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.7.21/kotlin-gradle-plugin-api-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.7.21/kotlin-gradle-plugin-api-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.7.21/kotlin-gradle-plugin-api-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.7.21/kotlin-gradle-plugin-api-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin-model/1.7.21/kotlin-gradle-plugin-model-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin-model/1.7.21/kotlin-gradle-plugin-model-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-tooling-core:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-tooling-core:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-tooling-core/1.7.21/kotlin-tooling-core-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-tooling-core/1.7.21/kotlin-tooling-core-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea/1.7.21/kotlin-gradle-plugin-idea-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin-idea/1.7.21/kotlin-gradle-plugin-idea-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/1.7.21/kotlin-gradle-plugin-idea-proto-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin-idea-proto/1.7.21/kotlin-gradle-plugin-idea-proto-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-util-klib:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-util-klib:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-util-klib/1.7.21/kotlin-util-klib-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-util-klib/1.7.21/kotlin-util-klib-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-klib-commonizer-api/1.7.21/kotlin-klib-commonizer-api-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-klib-commonizer-api/1.7.21/kotlin-klib-commonizer-api-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-project-model:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-project-model:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-project-model/1.7.21/kotlin-project-model-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-project-model/1.7.21/kotlin-project-model-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.7.21/kotlin-compiler-embeddable-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.7.21/kotlin-compiler-embeddable-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.7.21/kotlin-annotation-processing-gradle-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.7.21/kotlin-annotation-processing-gradle-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-android-extensions:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-android-extensions:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-android-extensions/1.7.21/kotlin-android-extensions-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-android-extensions/1.7.21/kotlin-android-extensions-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-compiler-runner:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-compiler-runner:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-compiler-runner/1.7.21/kotlin-compiler-runner-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-runner/1.7.21/kotlin-compiler-runner-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.7.21/kotlin-scripting-compiler-embeddable-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.7.21/kotlin-scripting-compiler-embeddable-1.7.21.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.21.
Required by:
project : > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.21 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21
> Could not resolve org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.21.
> Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.7.21/kotlin-scripting-compiler-impl-embeddable-1.7.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-scripting-compiler-impl-embeddable/1.7.21/kotlin-scripting-compiler-impl-embeddable-1.7.21.pom'. Received status code 403 from server: Forbidden
* 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 7s
You can update your IntelliJ IDEA to the newest version and recreate a project.
You can also remove the jcenter() usage from your build.gradle and settings.gradle.
Reason:
Your Gradle log says
Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin-api/1.7.21/kotlin-gradle-plugin-api-1.7.21.pom'. Received status code 403 from server: Forbidden
which means it was trying to download Kotlin from JCenter. However, JCenter had stopped their service on May 1st 2021.
Kotlin is also available on Maven Central. It is encouraged to use Maven Central.
Newer IntelliJ would generate projects using Maven Central by default.
For you, I guess you are using an old IntelliJ IDEA, or an old Kotlin or Gradle plugin.
Why can't Gradle fallback to Maven Central?
When you declare multiple repositories, Gradle will try them one by one. If one repository returned 404 Not Found, Gradle attempts other repositories, which sounds good. But if Gradle receives an error from a repository, like in your case, it throws an exception complaining about that and crashes the build.
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?
for me, the solution was to install
#segment/sovran-react-native
yarn add #segment/sovran-react-native
After updating Gradle to 6.8.3, running my react-native app shows this error:
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61.
Required by:
project :
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61.
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.61/kotlin-gradle-plugin-1.3.61.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.61/kotlin-gradle-plugin-1.3.61.pom'. Received status code 403 from server: Forbidden
> Could not resolve com.android.tools.build:gradle:3.5.3.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.5.3.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'. Received status code 403 from server: Forbidden
* 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
I've created a new Grails 4.0.2 application and ran it, got the
FAILURE: Build failed with an exception.
* What went wrong:
Could not download web.jar (org.grails.profiles:web:4.0.0)
> Could not get resource 'https://repo.grails.org/grails/core/org/grails/profiles/web/4.0.0/web-4.0.0.jar'.
> Could not HEAD 'https://repo.grails.org/grails/core/org/grails/profiles/web/4.0.0/web-4.0.0.jar'.
> sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
* 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
CONFIGURE FAILED in 9s
Any ideas?
The JDK or certificate store you are using is out of date. Update to a more recent version of your JDK distribution or add the missing certificates manually.
This is because of Sectigo's AddTrust External CA Root Expiring May 30, 2020
Everything was working fine then suddenly I'm getting following error
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
:react-native-mauron85-background-geolocation:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-mauron85-background-geolocation:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 23.413 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I managed to fix this by changing one line in node_modules/react-native-mauron85-background-geolocation/android/lib/build.gradle
from
compile 'com.android.support:support-v4:+'
to
compile 'com.android.support:support-v4:23.+'