Multibinding for Dagger 2.9 (Sets and Maps)

If you didn’t use multibinding before, you can see how it worked earlier until 2.8 there:

In the Dagger version 2.8 Provides.Type deprecated. It means, since version 2.9 Multibinding using type doesn’t work:

@Provides(type = Provides.Type.SET) - now deprecated

Now instead type you can use annotations in your module.

@IntoSet for Set:

Modified example from

@IntoMap for Map:

Modified example for Map

Instead of @StringKey you can use @IntKey, @LongKey, @ClassKey

On activity, fragment, etc.. you can inject as previously:


Set<Translator> mTranslatorSet;


Map<Strig, Translator> mTranslatorMap;