ced3eals
ced3eals

Reputation: 28

Compiling problem after adding databinding in android studio

When I'm trying to compile my Android project using dataBinding ressouce, I get this error message

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]'

In the app build.gradle:

android {
    dataBinding{
        enabled=true
}

Upvotes: 1

Views: 709

Answers (1)

zmunm
zmunm

Reputation: 436

If you are using data binding with kotlin, you need to add this in your 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
}

Upvotes: 1

Related Questions