user1572522 user1572522 - 4 days ago 6
Android Question

Android Studio Gradle build issue

I upgraded the Eclipse ADT Plugin, and did an Export on a project, to use Gradle,
then Imported it to the latest Android Studio 0.3.2., selecting the 'build.gradle'
like they want you to.

I downloaded the very latest Gradle 1.9, but I was getting errors
that said basically "Need Gradle 1.6, found 1.9".

I got the build to the point where it complained about the "dependencies"
classpath in the build.gradle:

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


So, how can I find what classpath it will be happy with, and another
question I have is, can I get away with removing the repositories, mavenCentral()?

Sorry, I'm new to trying to use Gradle, and it's been
very frustrating.

Thanks!

Answer

Gradle 1.9 is not officially supported yet. See https://groups.google.com/d/msg/adt-dev/Xntuvifurjg/i6O0B4nyRwcJ

In the meantime gradle 1.8 should work.

Also the latest build tools are 0.6.+

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