today I just imported a sample app from Android SDK as a module in my project (analytics) and suddenly I got this gradle error when I try to sync it: Plugin is too old
You should upgrade the version of gradle. for example: com.android.build.gradle 1.3.0
this issue occurs when version of the gradle is changed.
Check the latest version of Gradle Plugin Here:
You should change this in dependencies of app settings
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:[PLACE VERSION CODE HERE]'
}
}
Solution (Updated: 24-may-2016): Change build.gradle (project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:X.X.X-lastVersionGradle'
classpath 'com.google.gms:google-services:X.X.X-lastVersionGServices' // If use google-services
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
X.X.X-lastVersionGradle: For example: 2.1.0
X.X.X-lastVersionGServices: For example: 3.0.0 (support Firebase Analytics)
Note: if you're using the google-services plugin has to be the same version (if there)
Warning!! -> 2.2.0-alpha throws Unsupported major.minor version 52.0 if you don't use java JDK 8u91 and NetBeans 8.1
I got a way which finally resolve this 1. check your calsspath in the top build.gradle,e.g mine is classpath 'com.android.tools.build:gradle:2.1.0-alpha3' then go to https://jcenter.bintray.com/com/android/tools/build/gradle/ find a release which is newer than yours,here I choose 2.1.0-beta3 change classpath to below, then launch the build. classpath 'com.android.tools.build:gradle:2.1.0-beta3'
set Environment variable ANDROID_DAILY_OVERRIDE to same value Example - b9471da4f76e0d1a88d41a072922b1e0c257745c
this works for me.
Go for stable version or gradle in app level gradle file
in my case it was
classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
I changed it with
classpath 'com.android.tools.build:gradle:2.1.2'