Esperanz0 Esperanz0 - 3 months ago 35
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:

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


I tried bindView like always


@BindView(R.id.menu_hamburgerIcon) 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

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'