Top "Dagger" questions

Dagger is a dependency injection library for Java and Android.

Can I just inject super class when use dagger2 for dependency injection?

I use Dagger2 for DI in my android application. I found that I have to write inject method for every …

java android dependency-injection dagger dagger-2
Dagger 2 - two provides method that provide same interface

lets say I have: public interface Shape {} public class Rectangle implements Shape { } public class Circle implements Shape { } and I have …

java android dependency-injection dagger-2 dagger
Dagger 2 - Why is this a dependency cycle?

I'm trying to inject the application's Context into 2 other objects, an AuthManager and an ApiClient. Both of them depends on …

android dependency-injection dagger dagger-2
Dagger 2 Generic Type class inject error

I'm not able to let MyClass here being injected due to its Generic nature. Dagger complains with this error: Error:(187, 10) …

generics dependency-injection dagger
How to inject into a BroadcastReceiver

Does someone already had to inject an already existing class, with some business logic, into a BroadcastReceiver using dagger? I'm …

android dependency-injection broadcastreceiver dagger
Error: cannot find symbol variable DaggerAppComponent

While trying to integrate latest Dagger 2 version, I am facing problem of Dagger auto generation. Dagger is not auto generating …

android dependency-injection dagger-2 dagger
Context cannot be provided without an @Provides-annotated method, but it is?

I have the following simple module: @Module public class ApplicationModule { private CustomApplication customApplication; public ApplicationModule(CustomApplication customApplication) { this.customApplication = customApplication; } @…

android dagger dagger-2
Dagger + Retrofit. Adding auth headers at runtime

I'm wondering if there is a way for Dagger to know that it should recreate an object when new data …

java android retrofit2 dagger-2 dagger
how it works @BindsInstance dagger 2

I have recently updated dagger 2.8 to 2.9 dagger. and documentation of the last release have been added as follows: -Added @BindsInstance …

dagger-2 dagger
Module depending on another module in Dagger

I'm trying to use Dagger to do Dependency Injection on an app that I'm building, and running into trouble constructing …

java android dependency-injection dagger