I am working through a basic tutorial (literal basics) and although I have followed the tutorial exactly (my screen matches the tutorial screen) I am getting an error with the “a” variable. Does anyone have any suggestions as to why I am getting this error?
The only code is what is shown in the images.
Please note I am a total beginner and know very little about Kotlin or Android studio. Thanks in advance.
By the way, these gray badges in the code are called “inlay hints”. You can turn them on or of in the settings of every JetBrains IDE. Just go to settings and search for inlay hints.
If you actually want to reference parameters by their name (named parameters), you have to use =. This is different from other languages (like Dart, for example).