I'm trying to use Butterknife with some Kotlin code and also Java code. I know that before M12, there was bad or no support for annotation processing that ButterKnife required. So I have kept my activities in Java. It was working at least in Java with Butterknife 6.x and preM12 Kotlin.
I'm trying now butterknife 7.x with M13 and M14. It should have even annotation processing support, but it's not working for me. bind()
function doesn't bind anything in my adapter which is written in Java nor in activity written in Kotlin.
I'm using this in build.gradle (tried latest version on Github):
apply plugin: 'com.neenbedankt.android-apt'
dependencies {
provided files('libs/butterknife-annotations.jar')
kapt files('libs/butterknife-compiler-8.0.0-SNAPSHOT.jar')
compile 'com.jakewharton:butterknife:8.0.0-SNAPSHOT@aar'
}
This doesn't compile. I tried also 'com.neenbedankt.android-apt' which does compile but binding is not working.
I know that there is probably not support in butterknife for that yet. But is there any hack to get it working?
synthetic
marked with red color. Also this does not work correct with fragment. KollerKnife is very straightforward and lightweight solution. Also this PR: github.com/JakeWharton/kotterknife/pull/7 implements reset feature, so you can use kotterknife with fragments. – Tini