Android studio 3.0 : 编译应用时出错

Android studio 3.0 : error occur while compiling app

编译 android 应用程序时出错。

Execution failed for task ':app:javaPreCompileDebug'
The following dependencies on the compile classpath are found to contain annotation processor.Please add them to the annotationProcessor configuration.
- butterknife-5.1.2.jar (butterknife-5.1.2.jar)

尝试添加该库的最新版本。并且不要忘记在您的依赖项中添加 annotationProcessor:

compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

不要使用 5.1.2 jar.Instead 在 gradle 中使用这个最新版本并使用注释使其工作。

dependencies {
    compile 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}

在您的应用中添加以下行 gradle

 compile 'com.jakewharton:butterknife:8.8.1'
 annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

然后在 class 中使用 BindView 而不是 Bind。