I am using butterknife 8.0.1
, but a nullpointerexception
is appearing.
This line is on my build.grade file:
compile \'com.ja
Per the readme, you need to include the butterknife-compiler
in order for the generated code to be produced automatically:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
apply plugin: 'com.neenbedankt.android-apt'
dependencies {
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}
Without this there is no generated code to be loaded and thus none of the fields get set.
You can verify ButterKnife is working by calling ButterKnife.setDebug(true)
and looking in Logcat.