Can't build after updating to Android Studio 2.3
Asked Answered
E

4

5

Two warnings show up when I try to build my project:

Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.

and also at the end of all the binding errors:

Warning:The following options were not recognized by any processor: '[android.databinding.artifactType, android.databinding.printEncodedErrors, android.databinding.minApi, android.databinding.isTestVariant, android.databinding.enableDebugLogs, android.databinding.sdkDir, android.databinding.bindingBuildFolder, android.databinding.enableForTests, android.databinding.modulePackage, android.databinding.generationalFileOutDir, android.databinding.xmlOutDir]'

I tried to enable annotation processors and removed all apt reference and changed this:

apt 'com.jakewharton:butterknife-compiler:8.2.1'

to this:

annotationProcessor 'com.jakewharton:butterknife-compiler:8.2.1'

but it didn't work.

Expectation answered 6/3, 2017 at 1:46 Comment(3)
I figured out that the problem was that Realm was using apt inside its plugin, so I had to update itExpectation
did you have to update to the newest version?Didache
Yes, I had to update Realm to 3.0 so it works with annotationProcessorExpectation
V
3

You can down version of tools build gradle from 2.3.0 to 2.2.3 to avoid warning like that

classpath 'com.android.tools.build:gradle:2.2.3'
Vishinsky answered 7/3, 2017 at 6:19 Comment(0)
C
7

Just replace apt with annotationProcessor in your build.gradle file. And remove apt plugins wherever you see them.

Cecilla answered 7/3, 2017 at 13:52 Comment(0)
V
3

You can down version of tools build gradle from 2.3.0 to 2.2.3 to avoid warning like that

classpath 'com.android.tools.build:gradle:2.2.3'
Vishinsky answered 7/3, 2017 at 6:19 Comment(0)
T
0

Android apt is no longer supported in Android studio 2.3

see https://bitbucket.org/hvisser/android-apt/issues/73/no-longer-compatible-with-gradle-at-v230

Tincture answered 6/3, 2017 at 2:27 Comment(0)
N
0

after i update. i also have this kind of situation. Remove any apt like "com.neenbedankt.gradle.plugins:android-apt:1.8" from your dependencies classpath

but before that.. please invalidate cache/restart AS and clean gradle.

then

dependencies {
     classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'
}

then

apply plugin: 'com.jakewharton.butterknife'

then

compile "com.jakewharton:butterknife:8.5.1",
annotationProcessor "com.jakewharton:butterknife-compiler:8.5.1"

the lastly..put this in last app module

configurations.all {
    resolutionStrategy {
        force "com.android.support:support-annotations:25.2.0"
    }
}
Narvaez answered 6/3, 2017 at 4:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.