Error inflating class android.support.constraint.ConstraintLayout
After updating to androidx, running the program prompts me
Navigate to
The reason is that after I updated from the V7 package to androidx, the reference path of ConstraintLayout of the layout file referenced in the original setcontentview changed
So after changing android.support.constraint.ConstraintLayout to androidx.constraintlayout.widget.ConstraintLayout, the problem is solved
Error inflating class android.support.v4.view.ViewPager
Error message
What went wrong
How to change
Say that the following tags are the same as the packages introduced in mainactivity
<android.support.v4.view.ViewPager
>
</android.support.v4.view.ViewPager>
Modified result
operation result