google-developer-training / basic-android-kotlin-compose-birthday-card-app

Apache License 2.0
125 stars 95 forks source link

First Android app: Android Basics with Compose #894

Open ejazhasan75 opened 3 weeks ago

ejazhasan75 commented 3 weeks ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-first-app?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-1-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-first-app#5

In which task and step of the codelab can this issue be found? Step no. 6

Describe the problem Error in a line of code: modifier = modifier.padding(24.dp) details is as under In the block:

@Composable fun Greeting(name: String, modifier: Modifier = Modifier) { Surface(color = Color.Cyan) { Text( text = "Hi, my name is $name!", modifier = modifier.padding(24.dp) ) } } error is: modifier = modifier.padding(24.dp) correction is: modifier = Modifier.padding(24.dp)

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions Android Studio version: API version of the emulator:

Additional information Include screenshots if they would be useful in clarifying the problem.