Home  >  Q&A  >  body text

java - 在Fragment中使用使用ButterKnife.bind(this, view);还是找不到控件

在Fragment中使用使用ButterKnife.bind(this, view);还是报空指针,为什么?

巴扎黑巴扎黑2743 days ago503

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 10:52:43

    @BindView(R.id.user) EditText username;

    Look at the document carefully, your ID is wrong.

    reply
    0
  • Cancelreply