我有一个大型的Android项目,包含多个库模块。它们都使用Kotlin,并且许多已启用数据绑定。该项目和所有模块的构建和运行都没有错误。
然而,我一直在Gradle同步日志中收到每个模块的警告,我认为这是一个错误的正面反应:
这个警告是什么原因引起的?它确实是问题吗?如何让它消失?
然而,我一直在Gradle同步日志中收到每个模块的警告,我认为这是一个错误的正面反应:
> Configure project :feature-a
Kotlin plugin is applied to the project :feature-a but we cannot find the KaptTask. Make sure you apply the kotlin-kapt plugin because it is necessary to use kotlin with data binding.
> Configure project :feature-b
Kotlin plugin is applied to the project :feature-b but we cannot find the KaptTask. Make sure you apply the kotlin-kapt plugin because it is necessary to use kotlin with data binding.
> Configure project :feature-c
Kotlin plugin is applied to the project :feature-c but we cannot find the KaptTask. Make sure you apply the kotlin-kapt plugin because it is necessary to use kotlin with data binding.
[... etc. for dozens of modules ...]
我已经检查过确保 "kotlin-kapt" 插件正确应用。我正在为所有的模块使用 Kotlin Gradle DSL,并且像这样应用插件:
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-android-extensions")
id("kotlin-kapt")
id("androidx.navigation.safeargs.kotlin")
}
这个警告是什么原因引起的?它确实是问题吗?如何让它消失?