google-developer-training / android-basics-kotlin-cupcake-app

Apache License 2.0
103 stars 163 forks source link

Android Basics: Navigation backstack, typo on strings variable name #16

Closed AliceABarsse closed 3 years ago

AliceABarsse commented 3 years ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-training-navigation-backstack?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-navigation-backstack#4

In which task and step of the codelab can this issue be found?

  1. Send the order

Describe the problem The wrong variable name is used in the following example code in the page:

In your Kotlin code, calling:
getQuantityString(R.string.cupcakes, 1, 1) returns the string 1 cupcake
getQuantityString(R.string.cupcakes, 6, 6) returns the string 6 cupcakes
getQuantityString(R.string.cupcakes, 0, 0) returns the string 0 cupcakes

R.string.cupcakes should actually be R.plurals.cupcakes

Steps to reproduce? Error in Tutorial text, not in the actual code.

Versions Not relevant.

Additional information Not relevant.

kkuan2011 commented 3 years ago

Good catch, thank you! Fixed and will be published soon.