Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle error: could not execute build using gradle distribution

After I updated Android Studio to version 0.2.7, I got the following error:

 org.gradle.tooling.GradleConnectionException: Could not execute build  using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.: Could  not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'. 

This is my build.gradle:

buildscript {     repositories {         mavenCentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.5.+'     } } apply plugin: 'android'  dependencies {     compile files('libs/android-support-v4.jar') }  android {     compileSdkVersion 17     buildToolsVersion "17.0.0"  defaultConfig {     minSdkVersion 10     targetSdkVersion 17 } } 

Does anyone know this error?

like image 991
user2233215 Avatar asked Sep 07 '13 13:09

user2233215


1 Answers

I had the same issue, can't say I know what caused it, but I just closed Android Studio, renamed the c:\users\MY USERNAME\.gradle directory to old-.gradle and then re-launched Android Studio.

Android studio then re-created the directory and automatically downloaded the gradle zip file and set it all up.

Seems to all be fine but to be honest I don't know what this directory is nor what the root cause of the problem was either, so proceed with caution and keep the old .gradle folder around for a bit until you're happy all is working fine.

like image 190
Mark Fidell Avatar answered Sep 22 '22 02:09

Mark Fidell