butterknife 报空指针的 错误

butterknife  报空指针的 错误  不要着急

只需要在 app的  build  里面加两行代码  包你搞定

 

defaultConfig {
   ......
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
}

然后 加上依赖之后就好
compile 'com.jakewharton:butterknife:7.0.1'
记住这里的依赖 必须是7.0版本的
posted @ 2020-04-18 09:59  RockSmall  阅读(831)  评论(0编辑  收藏  举报