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-7.0.1.jar (com.jakewharton:butterknife:7.0.1)
根据提示解决:在build.gradle(Module) 中加
annotationProcessor ‘com.jakewharton:butterknife:7.0.1’
如图:

版本10.0.1出现这样的问题是类似的解决方式
annotationProcessor ‘com.jakewharton:butterknife:10.0.1’
(与title无关的内容…)
附上bufferknife的网站备用
btw, 才刚认识butterknife它就已经deprecated了,最新的替代是 view Binding
本文介绍了在Android开发中遇到的Butterknife执行任务失败的问题,提供了在build.gradle(Module)中添加annotationProcessor 'com.jakewharton:butterknife:7.0.1'(或针对10.0.1版本的10.0.1)的解决方案。同时提到了Butterknife已被废弃,推荐使用最新的替代技术ViewBinding进行视图绑定。
342

被折叠的 条评论
为什么被折叠?



