I have some issues when converting dagger interfaces from java to Kotlin
I got [Dagger/MissingBinding] java.util.Map cannot be provided without an @Provides-annotated method.
Here is my interface
interface TopicConfigModule {
@Binds
@IntoMap
@StringKey(NAME)
fun bindCommandHandler(handler: TopicCommandHandler): CommandHandler
companion object {
@JvmStatic
@Provides
@FragmentScope
fun provideHubsConfig(
commandRegistry: Map<String, CommandHandler>
): Config {
return ...
}
}
}
and CommandHandler is java interface
public interface HubsCommandHandler {```}
commandRegistry: Map<String, @JvmSuppressWildcards CommandHandler>, also you don't need@JvmStatic(I assume that you're using dagger 2.26 or higher) - IR42