I\'m getting an underline in some variables on Android Studio (in this case on the \'position\' variable). I think it\'s not an error because the application runs perfectly
I've found the answer for this question here.
The decoration is a syntax highlighting preference. Take a look at File > Settings > Editor > Color Scheme > Java/Kotlin
In the case of Java, you can find this effect for example at Parameters > Implicit anonymous class parameter. It's the checkbox Effects.
The same with Kotlin at Properties and Variables > Var (mutable variable, parameter or property).