Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: The Android Gradle plugin supports only Butterknife Gradle plugin version 9.0.0-rc2 and higher

I am update android studio to 3.3, in my project I get this error:

ERROR: The Android Gradle plugin supports only Butterknife Gradle plugin version 9.0.0-rc2 and higher.
The following dependencies do not satisfy the required version:
root project 'MyProject' -> com.jakewharton:butterknife-gradle-plugin:8.8.1
Affected Modules: app

and I am ready update Butterknife to 9.0.0-rc2

implementation 'com.jakewharton:butterknife:9.0.0-rc2'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'
like image 444
Ven Ren Avatar asked Jan 17 '19 02:01

Ven Ren


2 Answers

Are you using androidx in your app/library? If so, I would bump the butterknife version to the stable 10.0.0 version, otherwise update to the stable 9.0.0 one.

Without androidx:

implementation 'com.jakewharton:butterknife:9.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0'

With androidx:

implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'

You can find more about it in the change log here.

like image 68
Henrique Avatar answered Nov 11 '22 20:11

Henrique


You need to update the Butter Knife plugin inside your project build.gradle to something like this:

buildscript {
  repositories {
    mavenCentral()
   }
  dependencies {
    classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc2'
  }
}
like image 39
ישו אוהב אותך Avatar answered Nov 11 '22 19:11

ישו אוהב אותך