0

I'm trying to switch from eclipse to android studio. I exported my project with gradle in Eclipse and imported it in android studio. Now I get these error:

You are using an unsupported version of Gradle. Please use version 1.10.

I can't solve the problem with this:

Android-Studio upgraded from 0.1.9 to 0.2.0 causing gradle build errors now

because I don't have the classpath in my build.gradle. My looks like this:

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':Core')
}

Anybody know what I have to do?

Community
  • 1
  • 1
user3384194
  • 141
  • 1
  • 1
  • 11

1 Answers1

0

It's now better to import your Eclipse project directly in Android Studio than it is to export from Eclipse first; the Eclipse importer is more functional than the Gradle exporter. There used to be advice that recommended that you do the opposite, but that advice is out of date.

In reference to this specific error message, it's often lying. Frequently the problem is that the version of the Android-Gradle plugin that's specified in the build.gradle file is too old. The version you need depends on the version of Android Studio you're running; if you've got the latest Android Studio, 0.5.7 at the time of this writing, then you can use v0.10 of the plugin.

The plugin version is specified in the build.gradle file as below:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.10.0'
    }
}

Note that depending on how your project is structured, there may be multiple build.gradle files, and not all of them may need to specify a plugin version.

Scott Barta
  • 79,344
  • 24
  • 180
  • 163