live-love
live-love

Reputation: 52494

Execution failed for task ':app:dataBindingGenBaseClassesDebug'. Error after upgrading to Android Studio 3.2.1

I got the error after making the project:

FAILURE: Build failed with an exception.

This started after upgrading to Android Studio 3.2.1

Any ideas what this could be?

Upvotes: 10

Views: 13802

Answers (4)

hamil.Dev
hamil.Dev

Reputation: 398

In my case, i found this in the App gradle.

buildFeatures {
    viewBinding true
}

I just commented it out and all work fine. this binding option is generated when i was added a ScrollActivity to my project and deleted the next time

Upvotes: 0

Ali Can
Ali Can

Reputation: 41

If you get this error when using databinding its base reason is same id at one layout xml file. Can you check views ids.

Upvotes: 1

gabocalero
gabocalero

Reputation: 483

I had the same error at build time and it was caused by a binding variable (that declared inside <data></data> with a Java reserved word as name. For instance <variable name="case" type="com.mydomain.Case" />

Upvotes: 0

solamour
solamour

Reputation: 3234

The following command worked for me.

./gradlew assembleDebug --rerun-tasks

Upvotes: 28

Related Questions