Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio DataBinding Build Error

I am testing Android new feature DataBinding. My Android studio version is 1.5.1

so I followed the Android Developer Guide.

after this step:

android {
    ....
    dataBinding {
        enabled = true
    }
}

Android studio Build raised an Error,

Error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'.
java.lang.ExceptionInInitializerError (no error message)

I don't know what is going on, so any one has a work around?

like image 925
xiaoshenke Avatar asked Jan 01 '26 02:01

xiaoshenke


1 Answers

I'm guessing you use SQLDelight? I ran into this problem today. Apparently there is currently a conflict where you cannot use both Data Binding and SQLDelight, although it should be fixed soon. https://github.com/square/sqldelight/issues/123

An important debugging note for mysterious problems like this with no clear error message: do your Gradle build from the command line or Terminal pane in Android Studio. Mac:

./gradlew assembleDebug --stacktrace

PC:

gradlew.bat assembleDebug --stacktrace

You can also try the --info or --debug flags. Using these commands you can get much more information which can help when Googling for an answer.

like image 85
Chad Schultz Avatar answered Jan 02 '26 19:01

Chad Schultz