Butterknife @InjectView problem after upgrading to 7

I use @InjectView for many of my views. After I upgraded to the latest version 7, did they stop working? What happened?

+8
java android butterknife
source share
1 answer

You experience this because Butterknife version 7 has a new set of naming conventions. You will need to update your code to use the latest annotations.

Change @InjectView to @Bind .

Also change the Java code from Butterknife.inject(); at Butterknife.bind(this) . I assume you are doing this in an Activity. If you are doing this in snippet or have more complex use cases, you should check Butterknife documentation here

+20
source share

All Articles