今天遇到这个问题,坑了我2个小时时间,所以记录下来分享给大家,希望能有帮助吧!
网上很多都说需要引入'com.google.dagger:dagger-compiler:2.0.2' apt插件;
@Inject 同时使用private导致的,其他错误提示如下:
Error:(20, 8) 错误: [com.cxtx.chefu.app.mine.MineComponent.inject(com.cxtx.chefu.app.mine.service.SubServiceActivity)] com.cxtx.chefu.app.mine.service.SubServiceActivity cannot be provided without an @Inject constructor or from an @Provides-annotated method.
com.cxtx.chefu.app.mine.service.SubServiceActivity is injected at
com.cxtx.chefu.app.mine.MineComponent.inject(subServiceActivity)