Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle version 1.8 is required. Current version is 1.9-rc-3 - Android Studio

Gradle updates and error now, I can't import my project.

Error log:

Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.9-rc-3-bin.zip'.
Build file '/home/luiz/Dropbox/projetos/droido-beta/droido.torpedos/build.gradle' line: 9
A problem occurred evaluating project ':droido.torpedos'.
A problem occurred evaluating project ':droido.torpedos'.
Gradle version 1.8 is required. Current version is 1.9-rc-3. If using the gradle wrapper, try editing the distributionUrl in /home/luiz/gradle/wrapper/gradle-wrapper.properties to gradle-1.8-all.zip

How solve this?

like image 441
Luiz Carvalho Avatar asked Nov 28 '13 02:11

Luiz Carvalho


People also ask

How do I check my current Gradle version?

In Android Studio, go to File > Project Structure. Then select the "project" tab on the left. Your Gradle version will be displayed here.

Do I need Gradle for Android Studio?

Gradle is one type of build tool that builds the source code of the program. So it's an important part of Android Studio, and needs to be installed before starting developing your application. We do not have to install it separately, because the Android Studio does it for us, when we make our first project.


2 Answers

I had this issue with android studio 0.4.2, I changed the android tools in build.gradle from 0.6+ to 0.7+

original line in build.gradle:

classpath 'com.android.tools.build:gradle:0.6.+'

Changed to:

classpath 'com.android.tools.build:gradle:0.7.+'

Then I just ran Tools->Android->Sync Project with Gradle Files and everything worked.

like image 186
matt Avatar answered Oct 13 '22 19:10

matt


Gradle 1.9 is not yet supported by the build tools.

Consider using Gradle Wrapper which will download it's own version of gradle that your project is built from.

See (http://www.gradle.org/docs/current/userguide/gradle_wrapper.html)

Add the wrapper task and set it to 1.8 then run gradle wrapper

You might have to re-import your project to AS and when you do, tell it to use the wrapper.

Hope that helps.

like image 26
Michael Barany Avatar answered Oct 13 '22 17:10

Michael Barany