Search code examples
androidsdkandroid-motionlayout

MotionLayout in AndroidX does not exist


Android Studio cannot find MotionLayout in xml. I use the androidx.constraintlayout.motion.widget.MotionLayout tag and get a gray screen. I’m also implementing 'com.android.support.constraint:constraint-layout:2.0.0-alpha4' and changing to alpha02 changes nothing. I already found a question with the same problem, but it also had no solution.


Solution

  • I used the wrong implentation in gradle. Correct is implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'