Could not find method annotationProcessor() for arguments

使用butterknife 8.4.0遇到错误

Error:(35, 0) Could not find method annotationProcessor() for arguments [com.jakewharton:butterknife-compiler:8.4.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

1.把Android Studio更新到 2.2.2版本

2. build.gradle 中dependencies 更新 :

classpath ‘com.android.tools.build:gradle:2.0.0’ 到
classpath ‘com.android.tools.build:gradle:2.2.2’

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    
    
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

猜你喜欢

转载自blog.csdn.net/u012132482/article/details/53235977
今日推荐