0
mNetComponent = DaggerNetComponent.builder()
.appModule(new AppModule(this))
.build();
signInComponent= DaggerSignInComponent.builder()
.appModule(new AppModule(this))
.build();
我这是怎么构建我的成分,但它可以重用的DaggerSignInComponent如何重用匕首模块
你刚刚尝试过吗?你为什么要重复使用同一个模块?你有没有看过'@ Subcomponent'或'@Component(dependency = ...)',这两种方法都可以在两个组件上拥有相同的对象? –
谢谢,我想通了。我正在使用依赖关系 –