Android Studio 警告 : Using incompatible plugins for the annotation processing

标签 android android-studio warnings

将 Android Studio 更新到 2.3 版本后,我收到警告:

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

有什么解决办法吗?我的应用停止工作...

最佳答案

您的应用级 gradle 依赖项应包括(根据黄油刀网站说明):

compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

您可以删除该行:

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

注解处理在 Android Gradle 插件(2.2 及更高版本)中可用,因此如果使用此版本的 gradle 或更高版本,现在无需再使用上述插件。

如果您想知道如何关闭和打开注释处理,并且设置在:

设置 > 构建、执行、部署 > 编译器 > 注释处理器

关于Android Studio 警告 : Using incompatible plugins for the annotation processing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42632662/

相关文章:

R: `ID : Coercing LHS to a list` 在添加 ID 列中,为什么?

android - 波纹效果未显示在抽屉导航项目点击状态

java - 梯度错误 "Java plugin is not compatible with android plugins"

android - 如何清除 ListView 上的项目选择

java - 在 Android 中以编程方式将 TextView 置于 ConstraintLayout 中心 (java)

android - 在 android Studio 中导入 .aar

使用 c 编码 : warning: incompatible implicit declaration of built-in function ‘exp10’

c++ - VS2013 : How to disable warnings for included header files outside of the project

java - 测试期间如何在 Android 设备之间切换

android - 滚动内容时将页脚导航固定在移动视口(viewport)的底部