在AndroidStudio更新到3.0之后发现上面的配置不能用了,这里记录下解决方法
首先把项目下的build.gradle中的classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’删掉
把module下面的build.gradle最上面引入的插件删掉,不管是下面这两个中的哪一个,都删掉
apply plugin: ‘com.neenbedankt.android-apt’
apply plugin: ‘android-apt
在module下的build.gradle中的依赖修改为
// butterknife 组件注入
implementation 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'