解决Android Studio 3.0 butterknife:7.0.1配置的问题

网上教程7.0大多数配置是这样compile ‘com.jakewharton:butterknife:7.0.1' ,不知道他们用的Android Studio是多少版本,我用的3.0并没有成功,报错如下:

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) 
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.

解决办法:加上 annotationProcessor ‘com.jakewharton:butterknife:7.0.1'即可解决

以上这篇解决Android Studio 3.0 butterknife:7.0.1配置的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持呐喊教程。

声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:notice#nhooo.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。