Error using databinding in android

后端 未结 12 900
情深已故
情深已故 2020-12-16 09:45

I am trying to test data binding as given in the guide here. I have included this in my build.gradle file (of module app) :

compileSdkVersion \'android-MNC\         


        
12条回答
  •  别那么骄傲
    2020-12-16 10:28

    This appears to be an issue in android studio. The editor will flag it as an error however it will still compile.

    I had the same issue and so I cloned this example repo to test my system is configured correctly to support the databinding api https://github.com/mgrzechocinski/android-bindings-example

    Ignore the error warning on the layout tag. It is wrong.

    Something I noticed is you don't necessarily require the data tag if are simply using the databinding to get access to the views items through the BindingActivity class that is generated.

提交回复
热议问题