Gradle build is getting failed while running command build all

593 Views Asked by At
Download https //jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
BUILD FAILED
Total time  1 mins 55.436 secs
FAILURE  Build failed with an exception.

What went wrong ?

A problem occurred configuring root project  native.
Could not resolve all dependencies for configuration   classpath .
Could not download artifact  com.android.tools.build gradle 0.14.4 gradle.jar
Could not GET  https //jcenter.bintray.com/com/android/tools/build/gradle/0.14.4/gradle-0.14.4.jar
Connection to https //d29vzk4ow07wi7.cloudfront.net refused
1

There are 1 best solutions below

1
On

This is because the server does not have internet access to download the gradle files.

You either need to give the server internet access to get the gradle files or manually download them, put them on a HTTP server and point the gradle-wrapper.properties for each application to the file location.

Can also try pointing to a local directory but I am not sure if that will work.

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip