Android Studio2.3.3到3.0版本后,android-apt插件与Android Gradle插件不兼容问题。同时也更新了gradle到4.1后,就出现了这个问题。直接上解决办法:
错误:android-apt插件与Android Gradle插件不兼容。 请改为使用“ annotationProcessor”配置。
ERROR: android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
一、注释掉module的buid.gradle下
//应用插件
//apply plugin: 'android-apt'
二、修改dependencies模块(注释掉了一句,添加了一句声明进程的方式):
把apt改成annotationProcessor
//Android Annotations
// apt "org.androidannotations:androidannotations:$AAVersion"
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
三、在项目的build.gradle下面注释掉一句话(可以忽略)
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
一般前两步就可以解决这个问题了