这个问题在我才开始使用Dagger2的时候把我折磨坏了。
具体报错信息大概是Error:(14, 10) 错误: com.example.zengxianghui900.dagger2application.presenter.Register cannot be provided without an @Inject constructor or from an @Provides-annotated method.
我当时是接手别人的项目,用的rxjava+retrofit+mvp+dagger2框架,整到一起还是挺晕的。当时出这个问题检查了很久,感觉component都写对了,该jnject的地方都有了,怎么会出这问题。后来才发现,原来在注入presenter的时候,不能加private修饰,被这里坑惨了。