ButterKnife 8.0.1 not working

前端 未结 10 1196
粉色の甜心
粉色の甜心 2020-12-05 16:42

I am using butterknife 8.0.1, but a nullpointerexception is appearing.

This line is on my build.grade file: compile \'com.ja

10条回答
  •  误落风尘
    2020-12-05 17:42

    I have just faced this problem, after updating my project to Gradle version 3.0.1. I was able to fix it by just including in Gradle app file the line:

    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    

    The final result was:

        dependencies {
            compile fileTree(include: ['*.jar'], dir: 'libs')
            androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
                exclude group: 'com.android.support', module: 'support-annotations'
            })
    
            ...
    
            compile 'com.jakewharton:butterknife:8.8.1'
            annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
        }
    

    I hope this helps somebody, although this question being old.

提交回复
热议问题