1

I have recently updated my Android Studio from 0.2.9 to 0.3.1 and when I try to compile my project i get the error:

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

I have tried to use the terminal and successfully cleaned and rebuilt by using gradlew clean and then gradlew build. I have even invalidated the caches by using File -> Invalidate Caches / Restart but I still can't build using Android Studio.

Do you have any ideas on why I have this problem and how can I fix it?

Edit #1 : When I go into Settings -> Gradle I get an error: "Gradle location is unknown". Is that the problem? Where should that path point to?

  • check this if it helps http://stackoverflow.com/questions/19485981/unable-to-import-eclipse-project-to-android-studio – Raghunandan Nov 08 '13 at 10:37

1 Answers1

1

I have fixed the issue by using the advice from this post.

I have updated gradle-wrapper.properties from <AppNameProject>/gradle/wrapper/:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip

to

distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip

and build.gradle from <AppNameProject>/<AppName>/:

dependencies {
    classpath 'com.android.tools.build:gradle:0.5.+'
}

to

dependencies {
    classpath 'com.android.tools.build:gradle:0.6.+'
}
Community
  • 1
  • 1