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

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

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

jingjc   2021-03-28 我要评论
想了解解决Android Studio 3.0 butterknife:7.0.1配置的问题的相关内容吗,jingjc在本文为您仔细讲解Android Studio 3.0 butterknife:7.0.1配置的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点: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配置的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

猜您喜欢

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们