Error inflating class androidx.constraintlayout.ConstraintLayout after migration to androidx

后端 未结 17 1315
[愿得一人]
[愿得一人] 2020-11-27 14:24

I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX

I\'m getting the following

17条回答
  •  孤独总比滥情好
    2020-11-27 14:55

    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.

提交回复
热议问题