ButterKnife没有Generate ButterKnife Injections问题

我的as为1.5,在gradle里面用的是 com.jakewharton:butterknife:7.0.1 版本, 在gradle里面 compile 'com.jakewharton:butterknife:7.0.1' 并且ButterKnife.bind(this)之后 R.layout.activity_main,右键generate没有弹出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选项,上图




在网上找了半天,我猜测原因可能是as里面并没有产生真正的映射(只是猜测,不一定对)。当我再次用这个as新开另一个project的时候,只是在gradle里面 compile 'com.jakewharton:butterknife:7.0.1' 和  ButterKnife.bind(this) 就能产生 Generate ButterKnife Injections选项了。具体不知道什么原因,知道原因的情指教
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值