Gradle sync failed: 'com.android.build.gradle.BasePlugin' does not implement the Plugin interface
Asked Answered
F

1

21

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

Fechner answered 28/4, 2016 at 21:10 Comment(0)
W
37

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'
}
Wabash answered 2/5, 2016 at 8:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.