ButterKnife没有Generate ButterKnife Injections问题

Butterknife 一键自动生成findviewbyid和onclick的代码。

步骤如下:

一:

二:

三:

完成!

如果没有Generate ButterKnife Injections选择项,需要如下配置

File -> settings -> Plugins  -> Browse repositories -> ButterKnife 安装 提示重启 重启之后 -> compile 'com.jakewharton:butterknife:7.0.1' -> ButterKnife.bind(this) -> 右键R.layout.xxxxxx -> 就能看见Generate ButterKnife Injections选项,上图

搞定!

原文地址:https://www.cnblogs.com/lixiangyang521/p/6927753.html