-2

I'd like to know why Text() in Jetpack Compose (Kotlin) can't take String as an argument in this case? I am following the course from Android and I exactly did what they did (the course is from 6 march 2023). If you have any clue, let me know. Thanks

(Don't pay attention to the nature of my code)

First image of my code (https://i.stack.imgur.com/iKbKE.png) partial image of the error(https://i.stack.imgur.com/P2Kjf.png)

Argument should've been taken.

CptValian
  • 1
  • 1

1 Answers1

1

Your code is:

Text(
  text = message,
  fontsSize = 36.sp
)

But there is no parameter called fontsSize - that's why you're getting an error. You have to use the right name - fontSize:

Text(
  text = message,
  fontSize = 36.sp
)
ianhanniballake
  • 191,609
  • 30
  • 470
  • 443