Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead
The android-apt
plugin has been deprecated.
As of the Android Gradle plugin version 2.2, all functionality that was previously provided by android-apt is now available in the Android plugin.
- Make sure you are on the Android Gradle 2.2 plugin or newer.
- Remove the
android-apt
plugin from your build scripts- Change all (if any)
apt
,androidTestApt
andtestApt
dependencies to their new format
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
Delete from gradle apply plugin: 'android-apt'
Like this
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {