<ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="220dp" android:background="@color/white" xmlns:app="http://schemas.android.com/apk/res-auto">
</ConstraintLayout>
改为:
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="220dp" android:background="@color/white" xmlns:app="http://schemas.android.com/apk/res-auto"> </android.support.constraint.ConstraintLayout>
也就是ConstraintLayout需要加包名。