https://kotlinlang.org logo
#android
Title
# android
n

Nikola Milovic

10/26/2019, 3:00 PM
https://hastebin.com/axukizulop.bash DaggerApplicationComp is not found, i tried rebuidling and cleaning the project, I tried a lot of stuff online and nothing has worked Nothing is being generated
t

tseisel

10/26/2019, 4:30 PM
You have the correct dependencies. Could you also share your
ApplicationComponent
, the modules it includes and check that your project builds without errors (and if it fails, copy the error trace)
n

Nikola Milovic

10/26/2019, 4:49 PM
@tseisel I don't get any errors when I remove the DaggerApplicationComponent and everything related to it. ApplicationComponent:
Copy code
@Singleton
@Component(
    modules = [
        ApplicationModule::class
    ])
interface ApplicationComponent : AndroidInjector<QuoteApplication> {

    @Component.Factory
    interface Factory {
        fun create(@BindsInstance applicationContext: Context): ApplicationComponent
    }
}
t

tseisel

10/26/2019, 5:12 PM
Your component looks fine. Try with only those dependencies:
Copy code
implementation "com.google.dagger:dagger:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
You also need to add
Copy code
apply plugin: 'kotlin-kapt'
for kapt to work properly.
n

Nikola Milovic

10/26/2019, 6:35 PM
Tried it, still not working... Is it something on my end or a bug perhaps?
t

tseisel

10/27/2019, 10:47 AM
I can't tell for sure. Things you could do (if your project is not sensible) is sharing a Gradle Scan here. Running
gradlew app:assembleDebug --scan
should do the trick. This way we could review your build to see if something prevents Dagger from generating your component.
n

Nikola Milovic

10/27/2019, 4:47 PM
I'm certain I'm doing something wrong, here's the git project It's not sensible as it's a practice project to get a hang of these topics https://github.com/Nikola-Milovic/QuoteAppMvvm
2 Views