6

I'm trying to use the Barrier view in ConstraintLayout:

<android.support.constraint.Barrier
    android:id="@+id/buttonBarrier"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:barrierDirection="top"
    app:constraint_referenced_ids="answer1Button,answer2Button"
    />

It works fine in the IDE, and I get Barrier-specific lint messages. But when I run the app, it crashes trying to inflate the layout containing the Barrier:

java.lang.ClassNotFoundException: Didn't find class "android.support.constraint.Barrier"

I am using AndroidX ConstraintLayout 1.1.3:

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

What's happening here?

Luke Needham
  • 3,373
  • 1
  • 24
  • 41

1 Answers1

9

The xml tag is androidx.constraintlayout.widget.Barrier in the latest AndroidX version.

hrach
  • 2,443
  • 2
  • 26
  • 37