Top "Dagger" questions

Dagger is a dependency injection library for Java and Android.

Dagger 2 error: dependency "cannot be provided without an @Inject constructor" while it actually annotated with @Inject

I've started using Dagger 2 and faced strange issue that looks like a bug to me. I have 3 modules, that are …

android dagger dagger-2
Can't locate import javax.inject.Inject package

I'm trying to implement Dagger as a dependency injector in an IntelliJ project, but my code is failing on: import …

java importerror dagger
Dagger 2 subcomponents vs component dependencies

Dagger 1's plus() method is something I used quite often in previous applications, so I understand situations where you might …

dagger dagger-2
Dagger 2 - what is the purpose of a @Singleton annotation class

From the dagger 2 Documentation I noticed that you can have a @Singleton annotated class. What is the purpose of marking …

dependency-injection dagger dagger-2
Dagger 2 component not generated

In my module, in my base Application class component = DaggerCompClassComponent.builder() .classModule(new ModuleClass()).build(); it can not find DaggerCompClassComponent. …

android dagger
Dagger: IllegalArgumentException: No injector factory bound for Class

I am new to Dagger 2. I have 2 Activities, I want to use injected ViewModel for both. Here is my ViewModuleFactory : @…

android dependency-injection dagger-2 dagger
How to set up dependency injection using Dagger for things other than Activities and Fragments?

I started setting up dependency injection using Dagger as follows. Please feel encouraged to correct my implementation since I might …

android dependency-injection android-asynctask android-contentprovider dagger
Difference between Dagger and ButterKnife Android

Can anyone point out the difference between Dagger and Butterknife? I know that Butterknife is a view injection library and …

android butterknife dagger
Dagger and Butter Knife vs. Android Annotations

I am evaluating Dependency Injection (DI) frameworks for an Android app. The top contenders are: Dagger (with Butter Knife) and …

android dependency-injection dagger android-annotations butterknife
Dagger 2: Cannot be provided without an @Provides-annotated method

I just started learning dagger2 and faced strange issue that looks like a bug to me. Here's the module: @Module …

java android dependency-injection dagger-2 dagger