在我的应用程序模块的build.gradle文件中,我已经添加了以下内容:
但我仍然收到编译器警告:
dependencies {
kapt('com.android.databinding:compiler:3.1.2')
...
}
但我仍然收到编译器警告:
app: 'annotationProcessor' dependencies won't be recognized as kapt annotation processors. Please change the configuration name to 'kapt' for these artifacts: 'com.android.databinding:compiler:3.1.2'.
一切都正常运行,只是我讨厌有警告信息挂在那里。
非常感谢您的帮助!
kapt
是针对 Kotlin 代码的,而annotationProcessor
则是针对 Java 代码的。 - Ryan Amaral