first set classpath in root project gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath "com.jakewharton:butterknife-gradle-plugin:8.8.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
apply plugin in library module
apply plugin: 'com.jakewharton.butterknife'
dependencies {
// butter knife
implementation "com.jakewharton:butterknife:8.8.1"
annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
}
then I got gradle sync error:
Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'.
Possible causes for this unexpected error include:
You'll have to use 9.0.0-SNAPSHOT for now.
This is still not working.
when I user the 8.8.1 version,I have the same problem.
Most helpful comment
This is still not working.