1,第一步: 下载butterknife插件并重启AndroidStudioButterknife最新使用步骤

 

2,第二步: 添加依赖

在model中的dependencies添加两行代码:

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

 

3,第三步:代码中使用

        光标放在布局id上,右键generate

Butterknife最新使用步骤

       在弹出的下拉框中选择带煎蛋图标的点击进去

Butterknife最新使用步骤

          选择你需要findViewById的控件,Confirm就可以了

Butterknife最新使用步骤

 

相关文章:

  • 2021-08-18
  • 2021-09-23
  • 2021-10-26
  • 2021-06-28
  • 2021-10-25
  • 2021-12-02
猜你喜欢
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-10-02
  • 2022-12-23
相关资源
相似解决方案