您需要使用
限定符注释
@Moduleclass ModelModule { @Provides @Named("FirstInt") int provideInt() { return 1; }}@Moduleclass AnotherModule { @Provides @Named("SecondInt") int provideInt() { return 1; }}并在注入依赖时使用此限定符
@Injectprotected ApiInterface apiInterface;@Inject @Named("FirstInt") //or whatever you needprotected int valueInt;希望能帮助到你!另请查看官方文档-http:
//google.github.io/dagger/



