我在使用 ButterKnife 时遇到此错误:
error: cannot find symbol method findById(View,int)
TextView tvHeaderTextOne = ButterKnife.findById(headerView, R.id.tv_header_text_one);
更新到 Butterknife 10 后出现无法findById
的错误。
最佳答案
定义属性
@BindView( R.id.tv_header_text_one)
protected TextView tx ;
在 OnCreate 方法中:
ButterKnife.bind(this,yourview);
关于java - 无法在 ButterKnife 中使用 findById,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59321011/