I'm repairing my friend's code and got confused.  

My friend wants to fetch entered text (in EditText). Seems easy, right? Well, it is but instead of user input, he gets this warning/error:  

[![enter image description here](https://i.stack.imgur.com/sHoJr.png)](https://i.stack.imgur.com/sHoJr.png)

To be honest I'm not sure how to fix it. He is coding in Kotlin (Android 10).  

Activity that contains EditText:
[![enter image description here](https://i.stack.imgur.com/DFWe8.png)](https://i.stack.imgur.com/DFWe8.png)

And XML:  

[![enter image description here](https://i.stack.imgur.com/R3IyA.png)](https://i.stack.imgur.com/R3IyA.png)

This is how it looks when debugging:  

[![enter image description here](https://i.stack.imgur.com/Nm1VR.png)](https://i.stack.imgur.com/Nm1VR.png)

**The app started working just fine after running "File -> invalidate Cashes/Restart" option**, I just don't understand where this warning came from and how to fix it because the error remained unchanged (even though the app works). Do you have an idea how to solve it?

All the best!