I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX
I\'m getting the following
After clicking on Refactor -> Migrate to AndroidX , Make sure your all dependencies in the build.gradle(Module:app) is marked to the newest version.
If its not, dependency will appear in yellow highlighted color and you can change it by hovering the mouse over it.
Secondly, Change the ConstraintLayout tag in all XML layout files to
androidx.constraintlayout.widget.ConstraintLayout
For more safer option, clean your project and sync it again after the above steps.