Top "Dagger" questions

Dagger is a dependency injection library for Java and Android.

How to give same instance of ViewModel to both the Parent and Child fragment

There are two Fragments: ParentFragment and ChildFragment. ChildFragment has been added to a view of the ParentFragment. Now using Dagger2 …

android mvvm dependency-injection dagger android-viewmodel
Gradle Build Error - NullPointerException thrown during app:compileDebugJava gradle task

I keep receiving this error message everytime I try to make a gradle build. I recently made a build before …

android gradle android-studio ormlite dagger
error: [Dagger/MissingBinding] [dagger.android.AndroidInjector.inject(T)] Dagger

I wanna to make a simple project with one main activity and multiple fragments. here I have two fragments at …

java android dagger-2 dagger android-mvp
Cannot create an instance of custom ViewModel

I am using dagger2 library. whenever I am trying to run my project is says not able to create instance …

android dependency-injection dagger-2 dagger android-architecture-components
Dagger 2 issue overriding single provides annotated method from a module in a library which app uses

GitHub Project Link I have made a project on GitHub which is a model of the dagger 2 architecture of my …

java android dependency-injection dagger dagger-2
Injecting Androidx Fragments using Dagger 2

I want to inject my Androidx fragments using dagger 2. In my activity I have: public class MainActivity extends AppCompatActivity implements …

android dependency-injection dagger-2 dagger
How to work with DaggerApplication and DaggerAppCompatActivity

I'm trying to get my head around the new Dagger2 APIs and support for Android. I'm using Dagger2 version 2.15: implementation …

android dagger-2 dagger
java.lang.IllegalArgumentException: No injector factory bound for Class<MyActivity_>

The error I have is following: Caused by: java.lang.IllegalArgumentException: No injector factory bound for Class. Injector factories were …

android dagger-2 android-annotations dagger
Specifying order of annotation processors

I'm trying to run Dagger 2 as well as Lombok on my Java project. Lombok has to run first, of course, …

java dagger annotation-processing lombok
Java dependency injection: Dagger 1 vs Dagger 2, which is better?

What are the advantages of Dagger 2 over Dagger 1? So far I found (just) 2: Dagger 2 allows you to use code obfuscation …

java android dependency-injection dagger dagger-2