android databinding error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'

后端 未结 5 1161
不思量自难忘°
不思量自难忘° 2021-01-02 18:06

my partner in ours\' project use android databinding.in my pc had error,but in his mac not error.i cant resolve this program.please help!! it\'s my build gradle:

<         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-02 18:20

    I have the same problem, and I finally found the solution.
    I found that there is a layout xml file was written like that:

    
    

    and then it cannot built on Windows platform, but it can built on Mac OS X platform, I think its a bug of Android Data Binding, so my temporary solution is:
    don't writing any character in @{} section, use string reference instead. (in my case, its replace as android:text='@{ @string/age_text + String.valueOf(user.age) }'/>)
    hope it helps you.

提交回复
热议问题