我是靠谱客的博主 害怕大米,这篇文章主要介绍解决升级AS3.0+ Gradle4.0+ 使用ButterKnife apt报错问题这是报错详情-> Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use ‘annotationProcessor’,现在分享给大家,希望可以做个参考。

这是报错详情-> Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use ‘annotationProcessor’


原因是AS3.0之后对以前的apt什么的不兼容了。
首先:
1.删除工程根目录下build.gradle中dependencies 内

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

2.删除app目录中build.gradle中

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

最后:

将app目录中build.gradle中dependencies内

apt 'com.jakewharton:butterknife-compiler:8.8.1'

改为

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

之后try again

以后用ButterKnife又方便点了,少了两步

最后

以上就是害怕大米最近收集整理的关于解决升级AS3.0+ Gradle4.0+ 使用ButterKnife apt报错问题这是报错详情-> Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use ‘annotationProcessor’的全部内容,更多相关解决升级AS3.0+内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(115)

评论列表共有 0 条评论

立即
投稿
返回
顶部