Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProc

来源:互联网 发布:下载在线视频的软件 编辑:程序博客网 时间:2024/06/06 00:17

在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'

经过这三步就可以了

阅读全文
0 0
原创粉丝点击