IntelliJ:找不到要在 Kotlin 中去的声明

IntelliJ: Cannot find declaration to go to in Kotlin

在我的 activity_main.xml 中,我有一个 TextView:

    <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"
            android:id="@+id/str" />

在我的 MainActivity.kt 我已经声明:

str.setText("Changed")

IntelliJ 说找不到要转到的声明。我怎样才能解决这个问题?我查看了其他 answers,但它们不起作用。

我真傻...我所要做的就是添加这行代码:

val str = findViewById<TextView>(R.id.str)