2

I am using Butterknife to bind a views.When Binding group multiple views like Acting on Multiple Views In a List , @BindViews can't available. See below image:

enter image description here

I am trying below code:

@BindViews({ R.id.edtOne, R.id.edtTwo, R.id.edtThree })
List<EditText> editTextsList;

How can I resolved it?

pRaNaY
  • 24,642
  • 24
  • 96
  • 146
  • Yes thanks. But I want to use `@BindViews` with multiple views(Here EditText) as per given link is my question. – pRaNaY May 04 '16 at 09:49
  • Check my answer here http://stackoverflow.com/questions/36977646/nullpointerexeption-with-using-butterknife/36977769#36977769 – Jay Rathod May 05 '16 at 06:30

3 Answers3

9

make sure you update to latest version of ButterKnife:

Version 8.0.0 (2016-04-25)

@Bind becomes @BindView and @BindViews (one view and multiple views, respectively).
Leon Lee
  • 106
  • 1
  • 3
4

From Version 7.0.0 It has changed.

@Bind replaces @InjectView and @InjectViews. ButterKnife.bind and ButterKnife.unbind replaces ButterKnife.inject and ButterKnife.reset respectively.

Look at this Reference Link.

And from Version 8.0.0.

The runtime and compiler are now split into two artifacts.

compile 'com.jakewharton:butterknife:8.0.0'
apt 'com.jakewharton:butterknife-compiler:8.0.0'

Look at this Link Also.

Jay Rathod
  • 11,131
  • 6
  • 34
  • 58
2

Try in app module

implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
Tim Diekmann
  • 7,755
  • 11
  • 41
  • 69
Saqib
  • 21
  • 3