Dagger 2 does not generate the component class (Android, Kotlin)
问题 Basically, I wanted to test if TheCoffee was automatically "injected". But I could not find DaggerMyComponent . I think I must have done something wrong, but what? Under the MainActivity, @Component(modules=arrayOf(MyModule::class)) @Singleton interface MyComponent { fun inject(coffee: CoffeeShop) } @Module class MyModule { @Provides @Singleton @ForApplication fun provideCoffee():Coffee { return Coffee("Bad coffee"); } } data class Coffee(var Name:String) class CoffeeShop { @Inject var