- Home /
Gradle build failed - Could not resolve all artifacts for configuration
Hey guys !
Yet another "Gradle failed" error to submit. I had my share but I couldn't solve this one.
Basically the build process can't "get resource" from an URL (dl.google.com)
I tried to :
reinstall hub/various versions of unity/android studio.
Removed anti-virus
Removed firewall
Any idead of what can trigger this issue ?
Might not be relevant information but just in case :
Unity 2019.4
Trying to build for Oculus Quest (everything is setup corretly)
Managed to make it work on another computer
Thanks for the help !
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
> Could not resolve com.android.tools.build:gradle:3.4.0.
Required by:
project :launcher
> Could not resolve com.android.tools.build:gradle:3.4.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Connect to localhost:1234 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
> Could not resolve com.android.tools.build:gradle:3.4.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Connect to localhost:1234 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
Sadly, from what I remember we didn't fix this issue, just worked with another computer.
A clean reinstall might fix this ?
If deseperate : a full OS reinstall might be needed because of a weird specific setup issue that block the call somehow :shrug:
Answer by Divyansh20 · Jun 21, 2020 at 09:47 AM
On build settings, there should be a dropdown on the right side. It should be written as build type and next to it should be written "gradle" just change it to "internal" by clicking and selecting it it should fix your problem
internall build system was removed after 2018 version. in 2019 and 2020 you just build by gradle system!
Answer by shiki_2022 · Dec 15, 2021 at 11:27 AM
The layout is broken,so i only use screenshot. @ABerlemont