Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an
来源:互联网 发布:js 弹出是否 对话框 编辑:程序博客网 时间:2024/06/03 14:22
1.删除 build.gradle 下面的 classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
2.删除 build.gradle 下面的 apply plugin: 'android-apt'
3.修改 apt 为 annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
annotationProcessor 'org.immutables:value:2.4.4'
https://stackoverflow.com/questions/42632662/android-studio-warning-using-incompatible-plugins-for-the-annotation-processing
In my project I use, among other things, Butter Knife and Immutables. After adding Immutables I got the following warning
Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.
and ButterKnife stopped working.
My configuration was as follows:
build.gradle (Project: MyApplication)
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.1' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' }}
build.gradle (Module: app)
apply plugin: 'com.android.application'apply plugin: 'android-apt'...dependencies { ... // Butter Knife compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' // Immutables apt 'org.immutables:value:2.4.4' provided 'org.immutables:value:2.4.4' provided 'org.immutables:builder:2.4.4' provided 'org.immutables:gson:2.4.4'}
After changing
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
to
apt 'com.jakewharton:butterknife-compiler:8.5.1'
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)
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
2) Remove the plug in from the build.gradle (Module: app)
apply plugin: 'android-apt'
3) Change the dependencies from apt to the new annotationProcessor
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'annotationProcessor 'org.immutables:value:2.4.4'
- Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an
- 使用apt导入时报警告:Warning:Using incompatible plugins for the annotation processing: android-apt. This may
- 使用dataBinding出现Warning:Using incompatible plugins for the annotation processing: android-apt.
- Hint: This may be the result of an unspecified view, due to default view name generation.)]
- the partition is misaligned by 1536 this may result in very poor ...解决方法
- Using apt in an RPM world
- warning: ‘p’ may be used uninitialized in this function
- Using Cordova Plugins in React Native (Android)
- Lombok Requires Annotation Processing Annotation processing seems to be disabled for the project "xx
- warning C4366: The result of the unary '&' operator may be unaligned
- This warning can be disabled by using the command line flag -Dcom.android.build.gradle.overridePath
- This warning can be disabled by using the command line flag -Dcom.android.build.gradle.overridePath
- gcc warning: warning: 'tick' may be used uninitialized in this function
- 解决Warning:android-apt plugin is incompatible with future version of Android Gradle plugin.
- Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use
- Warning:android-apt plugin is incompatible with future version of Android Gradle plugin
- Caused by: The Result type [json] which is defined in the Result annotation on the class
- warning C4996: 'gets': This function or variable may be unsafe. Consider using gets_s instead.
- 腾讯安全联合实验室矩阵发布,“七大掌门人”首次集中亮相
- 阿里云Centos7.2安装MySQL
- Date.now()和Date.parse()的解释
- laravel在进行post提交注意
- python 爬虫之 Urllib库的基本使用
- Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an
- 为什么说谷歌资本投资上市公司预示着私募基金的复苏
- 微信可查企业信用 深圳用互联网+建设社会诚信
- 预告:解析CVPR2016:为什么深度学习几乎成了计算机视觉研究的标配? | 硬创公开课
- 七月算法强化学习 第六课 学习笔记
- 分布式 大型网站的架构演进
- Axure RP 8 7.0 注册码
- 除了分拣货物,机械臂还能干哪些活?
- 预订超10万 1600万极致柔光自拍vivo X7获认可