-1

I am using Android studio version 2.2 Preview 4. I am getting below error when ever open my IDE. Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "e71316b1598b09073ff04c4315280c3b0e755860" Gradle:

options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0-alpha4'
here; they belong
    }
}
allprojects {
    repositories {
        jcenter()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
vinodh kumar
  • 137
  • 2
  • 10
  • Because you're using an outdated version of Android Studio. [The latest version is 3.1.2](https://developer.android.com/studio/) – Michael Dodd Jun 07 '18 at 09:39
  • refer to this [link](https://stackoverflow.com/questions/29063968/plugin-is-too-old-please-update-to-a-more-recent-version-or-set-android-daily?rq=1) – Rutvik Bhatt Jun 07 '18 at 09:56
  • 1
    Possible duplicate of [Plugin is too old, please update to a more recent version, or set ANDROID\_DAILY\_OVERRIDE environment variable to](https://stackoverflow.com/questions/29063968/plugin-is-too-old-please-update-to-a-more-recent-version-or-set-android-daily) – Michael Dodd Jun 07 '18 at 09:58

2 Answers2

1

You're getting that error because you're using a version of Android Studio that is nearly 2 years out of date. Android Studio 2.2 stable was released on 19th September 2016 according to this page.

As there is no direct upgrade path from 2.x to 3.x using Android Studio's update manager, I would advise downloading the latest version of Android Studio (3.1.2 at the time of writing) and importing your existing project.

Michael Dodd
  • 10,102
  • 12
  • 51
  • 64
  • Why need to download ? simply check for update if is ready to update then Click on Update. – Ali Jun 07 '18 at 10:16
  • @MohammadAli Because OP is using Android Studio 2 and there is no direct upgrade path to 3. If OP clicks "update now" they'll just be redirected to the page I've linked to. – Michael Dodd Jun 07 '18 at 10:20
0

First, you have to update your Android Studio so go to:

Help -> Check for Updates...

in Mac: Android Studio > Check for Updates

And also you have to update your build tools to the latest version like below:

classpath 'com.android.tools.build:gradle:3.1.3'
Paraskevas Ntsounos
  • 1,755
  • 2
  • 18
  • 34
  • 1
    There's no direct upgrade path for 2.x to 3.x, going to "Check for updates" would only send you to the Android Studio website. Using a version of Build Tools that doesn't match the IDE version would also cause problems. – Michael Dodd Jun 07 '18 at 09:57
  • I downloaded android studio with version 3.1 Canry. got error. Gradle sync failed: Could not run JVM from the selected JDK. Please ensure JDK installation is valid and compatible with the current OS (Windows 10 10.0, amd64). If you are using embedded JDK, please make sure to download Android Studio bundle compatible with the current OS. For example, for x86 systems please choose a 32 bits download option. (31ms) – vinodh kumar Jun 07 '18 at 11:25
  • Check if your pc support 32 or 64 bits and make sure you use same version. – Paraskevas Ntsounos Jun 07 '18 at 11:57