I was using butter knife from past 1 year in my project, it was all working fine. Now I update android studio with 3.0 and butter knife with 8.8.1. I have changed binding method with @BindViewas per instruction. Have added compiler too.
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
Also updated build tool version to
buildToolsVersion "27.0.2"
Also added flavour dimension.
Also, remove gradle apt plugin:
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
Offline work of Gradle is already unchecked.
try {
ButterKnife.bind(this);
} catch (Exception e) {
e.printStackTrace();
if (BuildConfig.DEBUG) {
showToast(e.getMessage());
} else {
showApologies();
finish();
}
Log.e("butterknife", e.getMessage());
}
And the message print is :
W/System.err: at butterknife.internal.Utils.findRequiredView(Utils.java:92)
W/System.err: at butterknife.ButterKnife.createBinding(ButterKnife.java:199)
W/System.err: at butterknife.ButterKnife.bind(ButterKnife.java:124)
Please give me a solution or put your views on it.