既然app-moudle和common-moudle都添加了butterknife依赖,那还需要设置其他的吗?

来源:3-6 客户端封装Activity和Fragment-2

ShaCoder

2019-03-29

app-module和common-module都在依赖中添加了

dependencies {
  implementation 'com.jakewharton:butterknife:10.1.0'
  annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
}

那么这两个module就都依赖了butterknife,就可以使用butterknife。
那还有必要在buildscript设置,然后在其他build.gradle中应用butterknife插件吗?
请老师解答。

写回答

1回答

Qiujuer

2019-03-31

不需要的哈,只需要都依赖:

  implementation 'com.jakewharton:butterknife:10.1.0'
  annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

即可,在那个module中使用了butterknife就加上上述的依赖即可;因为咱们不需要使用R2的方式,所以不用引入buildscript的配置。

0
0

手把手开发完整的即时通讯App 客户端+服务端+MVP架构

客户端+服务端+MVP架构+封装思想+主流框架

1755 学习 · 874 问题

查看课程