In my activity_main.xml
I have a 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" />
In my MainActivity.kt
I have declared:
str.setText("Changed")
IntelliJ says that it cannot find declaration to go to. How can I fix this? I have looked to other answers and they do not work.