Android Databinding : package does not exist

前端 未结 15 1155
暗喜
暗喜 2020-12-06 04:19

I\'m trying to use data-binding with Android.

I can not anymore build my project. I got this error :

\"Error:(13, 46) error: package ch.compan

相关标签:
15条回答
  • 2020-12-06 05:06

    The bug is not the DataBinding Package, it's a syntactic or logical error. For example, you have the attribute "lastName" in your POJO, but in the layout it's android:text="@{user.lastname}".

    Check your "layout" and do Rebuild Project.

    0 讨论(0)
  • 2020-12-06 05:07

    earlier my package name was "com.xyz.abc.Models" changing the package name to all small letters "Models" -> "models"

    solved the issue.

    0 讨论(0)
  • 2020-12-06 05:08

    Change the package name to lowercase. Instead of ViewModels use viewmodels. It worked for me.

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