Issue with data binding with gradle 3.2.1

前端 未结 3 1685
醉酒成梦
醉酒成梦 2020-12-17 16:51

When i have updated android studios 3.2.0 to 3.2.1. I have use data binding, when run project show me error like this, if i am wrong please suggest me.

Could         


        
相关标签:
3条回答
  • 2020-12-17 17:13

    The answer is pretty simple:

    just add these lines in gradle app

    //Data binding
    dataBinding.enabled = true
    

    and remove these two lines :

     apply plugin: 'kotlin-kapt'
     kapt "com.android.databinding:compiler:$gradle_version"
    
    0 讨论(0)
  • 2020-12-17 17:14

    I looked for many solution and finally i found that problem was in one of Dependencies, So I removed this kapt "com.android.databinding:compiler:$gradle_version" from app.gradle and project run succeffully.

    0 讨论(0)
  • 2020-12-17 17:14

    As of Android Studio 3.2, this kapt plugin is no longer required.

    However, without this plug in, the error message in case of any error, while compiling is cryptic. So, only option now it seems now is to downgrade your Gradle version to 3.1.4.

    Thanks to article at http://mobiledevhub.com/2018/01/05/android-two-way-databinding/

    0 讨论(0)
提交回复
热议问题