189 8069 5689

在androidstudio3.0中使用butterknife时出现报错如何解决

今天就跟大家聊聊有关在androidstudio3.0中使用butterknife时出现报错如何解决,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

成都创新互联专业为企业提供潍城网站建设、潍城做网站、潍城网站设计、潍城网站制作等企业网站建设、网页设计与制作、潍城企业网站模板建站服务,10多年潍城做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

问题

在添加butterKnife依赖的时候出现如下错误:

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

修改

android {
  ...
  defaultConfig {
    ...
    javaCompileOptions {
      annotationProcessorOptions {
        includeCompileClasspath = true 
      }
    }
  }
}

看完上述内容,你们对在androidstudio3.0中使用butterknife时出现报错如何解决有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注创新互联行业资讯频道,感谢大家的支持。


当前文章:在androidstudio3.0中使用butterknife时出现报错如何解决
网页链接:http://cdxtjz.cn/article/peesjo.html

其他资讯