解决Warning:android-apt plugin is incompatible with future version of Android(安卓)Gradle plugin.
16lz
2021-12-10
今天在导入google官方的dagger+mvp项目的时候遇见了一个错误,dagger不会自动生成DaggerAppComponent,查看的时候发现是有一个warning:
Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
原因是原来项目里使用的是android-apt生成编译时注解的方式,但是我使用的是Android studio3.0,Gradle已经和这个不兼容了,使用新版本就是会遇到很多坑。。。
然后解决办法就是
把Project的classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’*删除*,
同时把Module中apply plugin: ‘com.neenbedankt.android-apt’的也删除,
然后把dependencies中原来使用apt的改为annotationProcessor
然后重新sync Project,就ok了。
更多相关文章
- Android视频播放器源码
- Android中shape的使用
- android的Menu使用
- Android中的AnimationSet使用
- android activity 四大启动模式及使用场景
- Android如何进行数字签名与优化
- 箭头函数的基础使用
- NPM 和webpack 的基础使用
- Python list sort方法的具体使用