1

I have just updated my android studio. The current version is Android Studio 2.0 Preview 6. However I am getting the message described in the title of this post. I tried to play with the gradle version inside the dependecies of the gradle file,but nothing happens. Here is my file.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
 repositories {
    jcenter()
   }
    dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha6'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
 }

  allprojects {
  repositories {
    jcenter()
  }
  }

  task clean(type: Delete) {
   delete rootProject.buildDir
 }

Is there any specific value of gradle that I should put,in order to fix the problem? Some people fixed it by using the version of gradle:1.5.0.

Thanks

Theo
  • 3,099
  • 12
  • 53
  • 94

3 Answers3

1

Here is the full answer from my comments.

You need to use the same version of gradle for all submodules of your project. You can see a list of submodules by choosing "Android" presentation in you Project View and expand "Gradle Scripts" section. You will see all build.gradles that are included into your project.

Artem Mostyaev
  • 3,874
  • 10
  • 53
  • 60
1

As of April 22nd, 2016 the latest beta version became

classpath 'com.android.tools.build:gradle:2.1.0-rc1' And on June 3rd a stable 2.1.2 version was released which gives you the option to use

classpath 'com.android.tools.build:gradle:2.1.2'

0

Other answers here are correct but out of date, because this question does not get as much traffic.

This error indicates you are using a development environment that is far enough out of date that it could cause weird side effects, the solution is of course to upgrade to a more recent version.

When you use development versions, the error will reoccur as soon as your version is far enough behind the current version, which is why seasia's answer stopped working

I've been keeping an up-to-date list of the most current versions as well as the stable version on my answer to this similar question, so that I can fix it each time I get a new warning:

Android Studio 2.0 - Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE

Community
  • 1
  • 1
Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124