Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't resolve symbol BindViews in Butterknife

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?

like image 801
pRaNaY Avatar asked Jan 30 '26 21:01

pRaNaY


2 Answers

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).
like image 193
Leon Lee Avatar answered Feb 02 '26 11:02

Leon Lee


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.

like image 34
Jay Rathod RJ Avatar answered Feb 02 '26 11:02

Jay Rathod RJ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!