After upgrading from 2.2 to 2.3 I see this warning
and when I try to compile the project I see this compilation error
How can i solve this issue without downgrading to a previous gradle version? Is there any update of android-apt that can solve this issue?
Remove apt plugin
Change:
apt -> compile
testApt -> testAnnotationProcessor
androidTestApt -> androidTestAnnotationProcessor
In your build.gradle (app), add to defaultConfig:
vectorDrawables.useSupportLibrary = true
For me, I was having this error while using Contentful's
Vault
library which specifies that you include:and
What you need to do is DELETE
apply plugin: 'com.neenbedankt.android-apt'
and then CHANGE:
to
You can always check https://github.com/contentful/vault for the latest versions
In case the annotation processor has arguments, one also might have to change this:
to this:
The
android-apt
plugin has been deprecated.Check here for the migration guide:
You can remove
android-apt
by following the migration guide to get the equivalent functionalities.The important parts from the migration guide:
Also in the Android Gradle plugin there is an explicit check for this, which is what you are seeing:
Future Android Gradle plugin versions will not be compatible with the way
android-apt
works, which is the reason for that check.Piggybacking on @Gabriele Mariotti here since his answer is pretty spot on and implies this but doesn't state it. Gradle also does not suggest this as a valid option though it is as well. The testing equivalent for
androidTestApt
andtestApt
isandroidTestAnnotationProcessor
andtestAnnotationProcessor
.Example:
Should be changed to