androidwarningsandroid-builddagger-hiltkapt

warning : The following options were not recognized by any processor: '[dagger.fastInit, kapt.kotlin.generated]'


I get this warning when I try to run or build an app in Android Studio. Why am I getting this? Do I need to heed this warning?

The following options were not recognized by any processor: '[dagger.fastInit, kapt.kotlin.generated]'

Solution

  • Move the id "kotlin-kapt" to the bottom of plugins{} in build.gradle Module-level.

    Update

    If you have migrated to KSP, as per the official documentation of dagger

    Warning: Dagger’s KSP support is currently in alpha.

    Here are a few steps that I believe might help:

    1. Removing annotationProcessor entries might help [Reference Answer]. But not always: Reference Document
    2. Replace annotationProcessor with ksp. (Reference)