I use a library with oil. I do not know how to use it. I found that injectView and bind do the same thing, but I'm not sure. Can anyone explain the difference between the two.
@InjectView been changed to @Bind .
@InjectView
@Bind
Label the fields with @Bind and the view ID for Butter Knife to find and automatically display the corresponding view in your layout.
class YourActivity extends Activity { @Bind(R.id.TvTitle) TextView title;
Please check the links below. Hope this helps.
Import butterknife.InjectView cannot be resolved
Introduction Butter Knife
GRADLE
compile 'com.jakewharton:butterknife:7.0.1' //8.4.0
https://github.com/JakeWharton/butterknife/blob/f65dc849d80f6761d1b4a475626c568b2de883d9/CHANGELOG.md
If I am not mistaken, they have the same function. A change has been made to the naming convention, since butterknife version 7, injectView been changed to bind .
injectView
bind
Check changelog , also check this problem .
Check out this link: How to use butterknife
Starting with version 8.0.0, @Bind becomes @BindView and @BindViews
See the change log for beginners for more information.