步骤一 

在AS中安装好ButterKnife Android Zelezny插件(安装好了记得重启android studio)

ButterKnife在AS依赖添加(fangken)

步骤二 

在Project 中加入classPath(如图)

ButterKnife在AS依赖添加(fangken)

classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'//用于复制
步骤三

在app 中加入(如图)

ButterKnife在AS依赖添加(fangken)

compile 'com.jakewharton:butterknife:8.8.1'//用于复制
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'//用于复制

好了这样就大功告成了

有些博主还在app gradle 加了一行,我测过报错(如下)附:

//在app的build.gradle中添加

//位置是在dependencies的外边

apply plugin: 'com.neenbedankt.android-apt'

知道原因的可以留言给我

相关文章:

  • 2021-12-19
  • 2018-06-04
  • 2021-08-31
  • 2021-12-12
  • 2021-06-21
  • 2021-05-28
  • 2021-09-22
  • 2021-09-26
猜你喜欢
  • 2021-07-23
  • 2021-11-07
  • 2021-08-03
  • 2022-12-23
  • 2021-08-10
  • 2021-04-24
  • 2021-08-18
相关资源
相似解决方案