Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 530
Arunabh Das Avatar asked Apr 28 '16 21:04

Arunabh Das


1 Answers

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' } 
like image 116
AJoy Avatar answered Sep 24 '22 03:09

AJoy