当我尝试使用dataBinding ressouce编译我的Android项目时,收到此错误消息
w: warning: The following options were not recognized by any processor:
'[android.databinding.artifactType, android.databinding.printEncodedErrors,
android.databinding.minApi, android.databinding.isTestVariant,
android.databinding.enableDebugLogs, android.databinding.sdkDir,
android.databinding.bindingBuildFolder, android.databinding.enableForTests,
android.databinding.modulePackage, kapt.kotlin.generated,
android.databinding.generationalFileOutDir, android.databinding.xmlOutDir]'
在应用程序build.gradle中:
android {
dataBinding{
enabled=true
}
答案 0 :(得分:0)
如果您将数据与Kotlin结合使用,则需要在build.gradle
apply plugin: 'kotlin-kapt'
dependencies {
kapt "com.android.databinding:compiler:3.2.1" // this version must like com.android.tools.build:gradle version
}