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 said context, and the ApiClient depends on the AuthMa
Solution 1:
@Provides@Singleton
public AuthManager providesAuthManager(AuthManager manager) {
returnmanager;
}
Your providesAuthManager
method which provides an AuthManager
depends on an AuthManager
.
There's your cycle :)
Post a Comment for "Dagger 2 - Why Is This A Dependency Cycle?"