Esperanz0 Esperanz0 - 1 year ago 173
Android Question

ButterKnife error: cannot find symbol method findRequiredViewAsType

I'm using ButterKnife for along time.
But I have error which see for first time and didnt find solution for this.


Error:(24, 36) error: cannot find symbol method findRequiredViewAsType(Object,int,String,Class<ImageView>)

I tried bindView like always

@BindView( ImageView menuHamburger;

Also added in gradle:

compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.1.0'

But still getting this error in genereted class by ButterKnife.

Answer Source

You have:

compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.1.0'

but both versions should be the same, so it should be 8.1.0, not 8.0.1 for compile entry:

compile 'com.jakewharton:butterknife:8.1.0'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download