51

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]'
Bincy Baby
  • 3,941
  • 5
  • 36
  • 62

3 Answers3

104

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

lets start coding
  • 1,839
  • 1
  • 10
  • 19
15

That happens when you compile a multi module project and some module has kapt but no entry point.

The issue is described here but is was already fixed here.

Just wait until next Android studio release or check if you have the latest versions of hilt and dagger

blacktiago
  • 351
  • 2
  • 11
  • 15
    My project only has one module, and yet I still had that warning. The solution was to place `id "kotlin-kapt"` last inside the plugins section as mentioned by Ibrahim Disouki. – Xam Jun 25 '22 at 00:07
6

For me adding this to the build file (in the android block) fixed it:

hilt {
    enableAggregatingTask = true
}

reference: https://youtrack.jetbrains.com/issue/KT-46940/Kapt-reports-a-warning-The-following-options-were-not-recognized-by-any-processor...#focus=Comments-27-5211169.0-0

thijsonline
  • 1,048
  • 11
  • 15