Android Studio 警告:使用不兼容的插件进行注释处理 [英] Android Studio Warning: Using incompatible plugins for the annotation processing

查看:35
本文介绍了Android Studio 警告:使用不兼容的插件进行注释处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

After update Android Studio to 2.3 version I have warning:

警告:使用不兼容的插件进行注释处理:安卓-apt.这可能会导致意外行为.

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

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

Any solutions? My app stopped working...

推荐答案

您的应用级 gradle 依赖项应包括(按照 butterknife 网站说明):

Your app level gradle dependencies should include (as per butterknife website instructions):

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 或更高版本,现在无需再使用上述插件.

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 :

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

这篇关于Android Studio 警告:使用不兼容的插件进行注释处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆