问题:使用 butterknife 时,有两个依赖配置:
-
api 'com.jakewharton:butterknife:10.2.0'
-
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
将上述配置写在BaseLibMoudle中,在此moudle中的BaseFragment中统一配置:
ButterKnife.bind(this, view);
在appMouble中的HomeFragment(继承了BaseFragment)中使用
@OnClick(R.id.iv_home_del)和@OnEditorAction(R.id.et_home_search)
无法起作用。
解决:将第2项配置annotationProcessor放在appMouble中