After update Android Studio to 2.3 version I have warning:
Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.
Any solutions? My app stopped working...
After update Android Studio to 2.3 version I have warning:
Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.
Any solutions? My app stopped working...
In my project I use, among other things, Butter Knife and Immutables. After adding Immutables I got the following warning
and ButterKnife stopped working.
My configuration was as follows:
build.gradle (Project: MyApplication)
build.gradle (Module: app)
After changing
to
warning disappeared and everything works as it should.
UPDATE
As Mark said, an annotation processor was included in the Gradle version 2.2 , so there is no reason to provide an extra one.
So:
1) Remove the class path for the apt from the build.gradle (Project: MyApplication)
2) Remove the plug in from the build.gradle (Module: app)
3) Change the dependencies from apt to the new annotationProcessor
To add to @Milan's answer, if you used the hotchemi permissiondispatcher library in your app level gradle file then you should replace it as follows:
Replace
with
Your app level gradle dependencies should include (as per butterknife website instructions):
You can remove the line :
Annotation Processing became available in Android Gradle plugin (2.2 and later) so there is now no need to use the above plugin anymore if using this version of gradle or greater.
If you'd like to know how to turn annotation processing off and on and AS the setting is in :
Settings > Build, Execution, Deployment > Compiler > Annotation Processors
At Project Gradle
buildscript --> dependencies
block, remove the secondclasspath
line :And at app Gradle
dependencies
block, change these lines, useapi
andannotationProcessor
:Also, remove this one: