Butterknife @InjectView issue after updating to 7
Asked Answered
W

1

8

I'm using @InjectView for many of my views. After I updated to the newest version 7 they stopped working? What happened?

Wainwright answered 6/7, 2015 at 16:35 Comment(0)
I
20

You are experiencing this because Butterknife version 7 has a new set of naming conventions. You'll need to update your code to use the latest annotations.

Change @InjectView to @Bind.

Also change your Java code from Butterknife.inject(); to Butterknife.bind(this). I'm assuming you're doing this in an Activity. If you're doing this in a fragment or have more complicated use scenarios, you should check out the Butterknife documentation here

Ictinus answered 6/7, 2015 at 16:36 Comment(1)
And now in v8 "@Bind becomes @BindView and @BindViews"Against

© 2022 - 2024 — McMap. All rights reserved.