Top "Dagger" questions

Dagger is a dependency injection library for Java and Android.

LiveData is not updating its value after first call

I have been beating my head against the wall and I cannot understand why this is happening. I am working …

android viewmodel dagger-2 android-room dagger
Dagger: Inject @Named strings?

EDIT 2018-02-08: Sample project demonstrating how to do this at https://github.com/ravn/dagger2-named-string-inject-example - Note: the …

dependency-injection dagger
DaggerAppComponent not created

With dagger 2.10 I used to be able to create the app component by doing sAppComponent = DaggerAppComponent.builder() .appModule(new AppModule(…

android dagger-2 dagger
Dagger 2 examples

Dagger 2 is around the corner but the available examples wouldn't even compile right off the box, and the documentation is …

android dagger dagger-2
Dagger- Should we create each component and module for each Activity/ Fragment

I've been working with dagger2 for a while. And I got confused wether to create an own component/module for …

android dagger dagger-2
Failed to resolve variable '${project.groupId}'

I migrate my project to AndroidX and I got these errors when building the project: [TAG] Failed to resolve variable …

android android-gradle-plugin dagger androidx
How do you override a module/dependency in a unit test with Dagger 2.0?

I have a simple Android activity with a single dependency. I inject the dependency into the activity's onCreate like this: …

android dagger-2 dagger
How to configure dagger + gradle

I have a project and migrating to gradle dependency, but I find myself with an issue trying to setup dagger …

android gradle dagger
How to set up DAGGER dependency injection from scratch in Android project?

How to use Dagger? How to configure Dagger to work in my Android project? I'd like to use Dagger in …

android dependency-injection dagger dagger-2
Kotlin Error: Dagger does not support injection into private fields

I use in kotlin activity ViewPager and I want in Kotlin Fragment use the dagger injection. I have got Error: …

android dependency-injection kotlin dagger-2 dagger