ButterKnife BindView 失败,报错NullP

2017-05-03  本文已影响0人  程序员学园

ButterKnife BindView 失败,报错NullPointerException,得到的View是null

原因是配置有误。

第一步

apply plugin: 'com.jakewharton.butterknife'

Paste_Image.png

第二步

compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
Paste_Image.png

第三步

 classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'

Paste_Image.png

CSDN地址
http://blog.csdn.net/e_Inch_Photo/article/details/71124816

上一篇 下一篇

猜你喜欢

热点阅读