[英]AndroidX migration - data binding error msg:Cannot find the setter for attribute 'android:visibility' with parameter type int
I'm migrating a project to AndroidX and have the following error : 我正在将项目迁移到AndroidX并出现以下错误:
Caused by: java.lang.RuntimeException: android.databinding.tool.util.LoggedErrorException: Found data binding errors. 造成原因:java.lang.RuntimeException:android.databinding.tool.util.LoggedErrorException:发现了数据绑定错误。 ****/ data binding error ****msg:Cannot find the setter for attribute 'android:visibility' with parameter type int on androidx.constraintlayout.ConstraintLayout **** /数据绑定错误**** msg:在androidx.constraintlayout.ConstraintLayout上找不到参数类型为int的属性“ android:visibility”的设置器
And the layout having the issue is : 而有问题的布局是:
<androidx.constraintlayout.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="@{myVar == STRING_SUCCESS ? View.GONE : View.VISIBLE}">
I don't know where to start ... Any help is greatly appreciated 我不知道从哪里开始。非常感谢您的帮助。
尝试使用androidx.constraintlayout.widget.ConstraintLayout
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.