You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
In which task and step of the codelab can this issue be found?
Task 2 : Learn about collections
Describe the problem
The codelab is demonstrating the usage of the contains functions for the sets.
It makes use of this line: println("contains 7: ${setOfNumbers.contains(7)}")
Which results in a Unresolved reference error.
Steps to reproduce?
Running the code listed in the codelab.
fun main() {
val numbers = listOf(0, 3, 8, 4, 0, 5, 5, 8, 9, 2)
println("list: ${numbers}")
println("sorted: ${numbers.sorted()}")
val setOfNumbers = numbers.toSet()
println("set: ${setOfNumbers}")
val set1 = setOf(1,2,3)
val set2 = mutableSetOf(3,2,1)
println("$set1 == $set2: ${set1 == set2}")
println("contains 7: ${setOfNumbers.contains(7)}")
}
The text was updated successfully, but these errors were encountered:
@suracoza
Thank you for reaching out to us.
We checked the code given by you, it is compiling with out any issues.
Please refer to the following screenshot.
Link to the code in Kotlin playground: https://pl.kotl.in/HvQsF2Y0l
Please cross check the variable name, setOfNumbers.
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-collections?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-collections#1
In which task and step of the codelab can this issue be found?
Task 2 : Learn about collections
Describe the problem
The codelab is demonstrating the usage of the contains functions for the sets.
It makes use of this line:
println("contains 7: ${setOfNumbers.contains(7)}")
Which results in a Unresolved reference error.
Steps to reproduce?
Running the code listed in the codelab.
The text was updated successfully, but these errors were encountered: