美文网首页
集成android-apt,报警告解决方法

集成android-apt,报警告解决方法

作者: 就是这么简简单单 | 来源:发表于2017-03-11 11:37 被阅读0次

Android Studio2.3版本,集成dagger,butterknife,使用以前的依赖方式android-apt,如下

会报警告

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

解决方法:直接删除classpath'com.neenbedankt.gradle.plugins:android-apt:1.8'和applyplugin:'android-apt',然后将apt替换为annotationProcessor

修改前

修改后

重新同步build,警告消除.

建议直接Github上依赖最新版本.

android-apt报警告是该作者在官网发表声明证实了后续将不会继续维护android-apt,

Google官方 插件提供了名为annotationProcessor的功能来完全代替android-apt

相关文章

网友评论

      本文标题:集成android-apt,报警告解决方法

      本文链接:https://www.haomeiwen.com/subject/sgjkyttx.html