I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX
I\'m getting the following
yepp. mavenCentral() and correct dependencies solve my same problems
If after adding mavenCentral() as a repository in your Gradle file and changing androidx.constraintlayout.ConstraintLayout
to androidx.constraintlayout.widget.ConstraintLayout
didn't solve your problem then try doing Invalidate cache and restart from the file menu. It worked for me.
I copied and pasted an existing ConstraintLayout tag from the xml, which was causing the issue for me. Simply deleting, and re-adding the ConstraintLayout tags in AndroidStudio from scratch fixed the issue for me.
I updated the dependency, yet it did not resolve the error. Then I did a clean project and build and it is working now.
build.gradle => check dependencies version
implementation 'androidx.constraintlayout:constraintlayout:1.1.1'
to change
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
solved the problem