activity_main.xml中把开头默认的
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
替换成
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
然后把末尾的
</androidx.constraintlayout.widget.ConstraintLayout>
替换成
</LinearLayout>
完工