Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to resolve DaggerAppComponent

I have gone through various stackoverflow link some of the link are :

LInk 1

Link 2

but no one solve this below are the gradle file and my application :

    // dependency injection
implementation 'com.google.dagger:dagger-android:2.14.1'
implementation 'com.google.dagger:dagger-android-support:2.14.1'
annotationProcessor 'com.google.dagger:dagger-android-processor:2.14.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.14.1'

And the MyApplication file is :

 DaggerAppComponent.builder()
            .application(this)
            .build()
            .inject(this);

    AppLogger.init();

enter image description here

like image 694
Rakesh kushwaha Avatar asked Aug 30 '26 06:08

Rakesh kushwaha


2 Answers

You have to build the project after setting up dagger and then start typing Dagger and Android Studio will show the class it built for dagger component

like image 194
theanilpaudel Avatar answered Aug 31 '26 22:08

theanilpaudel


There is many methods to solve it,

Below methods are worldwide problem solver

  1. Click on Invalidate/cache restart in android studio
  2. Close android studio, Go > androidStudio installed folder and delete cache folder manualy and start again.
  3. Rename dagger component and again clean/rebuild your project.

These 3 methods can solve your problem.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!