laobie / StatusBarUtil

A util for setting status bar style on Android App.
http://t.cn/Rq746Kb
Apache License 2.0
8.81k stars 1.72k forks source link

Attempt to invoke virtual method 'android.view.View android.support.v4.widget.DrawerLayout.getChildAt(int)' on a null object reference #138

Closed ProZoom closed 7 years ago

ProZoom commented 7 years ago

这个错误咋整

laobie commented 7 years ago

………你传个赋值了的 DrawerLayout 进来啊

ProZoom commented 7 years ago

我传了啊,我用ButterKnife获取id的,你看看,会报错

laobie commented 7 years ago

那你得保证 ButterKnife.inject() 方法在 StatusBarUtil 方法之前调用,不然你拿到的 DrawerLayout 就是空

ProZoom commented 7 years ago

当然之前了

laobie commented 7 years ago

那就我的库问题,这个问题太难了,我就不解决了,你换别的吧