Error using databinding in android

后端 未结 12 889
情深已故
情深已故 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:10

    Looks like you forgot to add data binding plugin to your app's gradle file:

    apply plugin: 'com.android.databinding'

    You have to apply it to any module you want to use data binding.

    Also, you should not add layout_w/h to the layout tag, it is just an Android Studio bug, already fixed in aosp.

提交回复
热议问题