Android &引用;java.lang.NoSuchFieldError:ConstraintLayout_Layout_Layout_Layout description";当我初始化项目时

Android &引用;java.lang.NoSuchFieldError:ConstraintLayout_Layout_Layout_Layout description";当我初始化项目时,android,android-studio,kotlin,Android,Android Studio,Kotlin,好的,我使用默认模板创建了一个全新的项目,结果如下: 发生了什么事? 以下是我的活动_main.xml: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln

好的,我使用默认模板创建了一个全新的项目,结果如下:

发生了什么事? 以下是我的活动_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

好的。。。
结果不是那么令人满意,但它起了作用。在designer中,我进入LayoutDescription字段,输入一些随机数,然后单击hammer图标,它就可以工作了!现在,即使我创建了一个新项目,它仍然有效。谢谢你们回答的所有其他问题。

你们能发布包含约束的xml文件代码吗?我把它发布在我的主要问题上了