Annotation processors must be explicitly declared now
来源:互联网 发布:线性变换旋转矩阵 编辑:程序博客网 时间:2024/06/06 00:21
Android Studio升级到最新版3.0 Canary 8后,当使用到注解时,报了如下错误:
Error:Execution failed for task ':app:javaPreCompileDebug'.> Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration. - butterknife-8.8.1.jar Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future. See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
借鉴网友的解决方法,在引用注解库的module下的build.gradle文件中,添加了如下配置。
android { ... defaultConfig { ... javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } } } ...}
遗憾的是,添加上述配置之后,仍然出现这个错误;
这个时候转念一想,工程结构是多module形式的,会不会是重复依赖导致的呢?顺着这个想法,到每个module下的build.gradle文件搜索,发现的确在两个module下都依赖了butterknife注解库。
找到问题就很好解决了,只要去除掉其中一个依赖就可以了。
阅读全文
0 0
- Annotation processors must be explicitly declared now
- Annotation processors must be explicitly declared now
- Annotation processors must be explicitly declared now...
- AndroidStudio3.0中报错Annotation processors must be explicitly declared now.
- 解决: Annotation processors must be explicitly declared now
- AndroidStudio 3.0 canary 8 Annotation processors must be explicitly declared now.
- 最新版AndroidStudio3.0 Canary 8的时候报错,Annotation processors must be explicitly declared now
- 《android日常bug系列》as3.0报错,Annotation processors must be explicitly declared now
- AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependenci
- AndroidStudio3.0 Canary 8注解报错Annotation processors must be explicitly declared now.
- Mr.Smile填坑记——AndroidStudio3.0 Canary 8注解报错Annotation processors must be explicitly declared now.
- Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
- Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
- Element translate must be declared
- Feign报错:Attribute 'value' in annotation,must be declared as an @AliasFor [serviceId], not [name]
- Hibernate Dialect must be explicitly set解决方法
- Hibernate Dialect must be explicitly set
- Hibernate Dialect must be explicitly set
- 网站的浏览器缓存设置
- HBase的RowKey设计原则
- java性能监控工具MoSKito学习--一步一步开始工作1,2
- 入门springboot报错org.apache.coyote.http11.AbstractHttp11Protocol.setCompressableMimeTypes
- Dijkstra算法1.0
- Annotation processors must be explicitly declared now
- bzoj2716 [Violet 3]天使玩偶(CDQ分治)
- Redis实现分布式session功能的共享
- 不同软件中的字符串操作
- 关于维特比算法的一些笔记
- centos安装apache
- 最新的google hosts配置
- greenDao的基本使用
- Duilib 源码分析之 Timer 篇