Butterknife: Gradle sync error with gradle 3.0 and butterKinfe plugin 8.8.1 in library

Created on 9 Nov 2017  路  3Comments  路  Source: JakeWharton/butterknife

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:

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

Most helpful comment

This is still not working.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings