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

2

today I updated Android Studio from 2.3 to 3.0, likewise the Gradle plugins were updated but in this one of my projects shows me this error (Error: android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead). then my muild.gradle (Module: app), thanks for the help.

    apply plugin: 'com.android.application'
    apply plugin: 'com.neenbedankt.android-apt'

    android {
        compileSdkVersion 26
        buildToolsVersion '26.0.2'
        defaultConfig {
        applicationId "com.tecnologias.uniagustapp"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner 
        "android.support.test.runner.AndroidJUnitRunner"
         }
         buildTypes {
         release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 
            'proguard-rules.pro'
                }
             }
          }

       dependencies {
       compile fileTree(dir: 'libs', include: ['*.jar'])
       androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })


    compile 'com.android.support:design:26.+'
    compile 'com.android.support:design:26.+'
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:support-v4:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:recyclerview-v7:26.+'
    compile 'com.android.support:cardview-v7:26.+'
    compile 'com.jakewharton:butterknife:8.4.0'
    compile 'com.thoughtbot:expandablerecyclerview:1.3'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    testCompile 'junit:junit:4.12'
    apt 'com.jakewharton:butterknife-compiler:8.4.0'
}
    
asked by Ivan Alfredo 26.10.2017 в 16:14
source

1 answer

4

In the following link you have the steps to migrate from apt to annotationProcessor

From apt to annotationProcessor

Basically:

  • Check that you have a version of Gradle +2.2
  • Remove the apt plugin from the build.gradle file (2 line 'apply plugin:' android-apt '
  • Change apt dependencies by annotationProcessor.
  • I hope it works.

        
    answered by 26.10.2017 / 17:44
    source