user2766109
user2766109

Reputation: 95

Gradle error during build and run

I'm trying to run my project (I use android Studio) I seem to be getting multiple issues with gradle. This showed up with after the current update:

 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'.

Does anyone have a solution for this?

Upvotes: 0

Views: 2440

Answers (1)

L.Butz
L.Butz

Reputation: 2616

I assume that you just updated to Android Studio 3.1.x.
You have to update the gradle version to 1.8 instead of 1.7.

Edit the following files (change the bold parts of the lines):

  • build.gradle - Line: classpath 'com.android.tools.build:gradle:0.6.+'

  • gradle-wrapper.properties - Line: distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip

You may need to click the "Sync project files with gradle files" after the change.

See also: Known Issues with Android Studio

Upvotes: 4

Related Questions