Ismail H
Ismail H

Reputation: 4499

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 :

Caused by: java.lang.RuntimeException: android.databinding.tool.util.LoggedErrorException: Found data binding errors. ****/ data binding error ****msg:Cannot find the setter for attribute 'android:visibility' with parameter type int on androidx.constraintlayout.ConstraintLayout

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

Upvotes: 0

Views: 576

Answers (1)

ronginat
ronginat

Reputation: 2005

Try using androidx.constraintlayout.widget.ConstraintLayout

Upvotes: 4

Related Questions