Sergey Nn Sergey Nn - 13 days ago 6
Android Question

Butterknife is not working with example

I saw the Butterknife tutorial and it states:

@BindViews({android.R.id.text1, android.R.id.text2})
TextView textEmail,description;


and I also tried:

@BindViews(android.R.id.text1)
TextView textEmail;

@BindView(android.R.id.text2)
TextView description;


But it's not working

Answer

I think you might be binding the android ids rather than your view ids.

Change android.R.id.text1 to R.id.yourText.

To group views, you can group them into list/array:

@BindViews({ R.id.first_name, R.id.middle_name, R.id.last_name })
List<EditText> nameViews;

Cheers~

Source: http://jakewharton.github.io/butterknife/