Gradle sync failed: 'com.android.build.gradle.BasePlugin' does not implement the Plugin interface-ThrowExceptions

Exception or error:

Environment : Android Studio 2.1

Project : Android SDK + Cordova

Android Studio throws the following error during Gradle Sync :

Gradle sync failed: ‘com.android.build.gradle.BasePlugin’ does not implement the Plugin interface

How to solve:

Faced the same issue after upgrading to android studio 2.1 from 1.5

Managed to resolve by updating the dependencies version if the gradle.gradleVersion >= 2.1 in the build.gradle file under buildscript {}

OLD Configuration

 if (gradle.gradleVersion >= "2.2") {
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
    }
} else if (gradle.gradleVersion >= "2.1") {
    dependencies {
        classpath 'com.android.tools.build:gradle:0.14.0+'
    }
} else {
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.0+'
    }
}

Updated Configuration

if (gradle.gradleVersion >= "2.2") {
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
    }
} else if (gradle.gradleVersion >= "2.1") {
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
    }
} else {
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.0+'
    }
}

If you do not have if/else clause in your build.gradle you can update the dependencies directly as below,

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

Leave a Reply

Your email address will not be published. Required fields are marked *