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 Jan 11, 2024. It is now read-only.
In which task and step of the codelab can this issue be found?
Course: Android Basics in Kotlin
Unit 2: Layouts
Sub Unit: Scrollable lists
Codelab Name: Use RecyclerView to display a scrollable list
Codelab Section : 5. Solution code
Describe the problem
In the file "affirmations/adapter/ItemAdapter.kt" there is an error on line no 44, holder.textView.text = context.resources.getString(item.stringResourceId)
Instead of stringResourceId in last part, we have to correct it with stringResourceID, Because in file "affirmations/model/Affirmation.kt" we had declared class variable "stringResourceID" as a parameter.
So, it creates an error because of the letter 'd', to solve the error just replace "stringResourceId" with "stringResourceID" at the line number 44 in file "affirmations/adapter/ItemAdapter.kt".
Or
Replace "stringResourceID" with "stringResourceId" at the line number 3 in file "affirmations/model/Affirmation.kt".
Steps to reproduce?
Go to...
Click on...
See error...
Versions What version of Android Studio are you using?
Version 4.2.1
Additional information Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered:
@param-radadiya
Thank you for reaching out to us. The issue is fixed: "stringResourceId" is in both packages "affirmations/model/Affirmation.kt" and "affirmations/adapter/ItemAdapter.kt"
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-recyclerview-scrollable-list?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-2-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-recyclerview-scrollable-list#4
In which task and step of the codelab can this issue be found?
Course: Android Basics in Kotlin
Unit 2: Layouts
Sub Unit: Scrollable lists
Codelab Name: Use RecyclerView to display a scrollable list
Codelab Section : 5. Solution code
Describe the problem
In the file "affirmations/adapter/ItemAdapter.kt" there is an error on line no 44, holder.textView.text = context.resources.getString(item.stringResourceId)
Instead of stringResourceId in last part, we have to correct it with stringResourceID, Because in file "affirmations/model/Affirmation.kt" we had declared class variable "stringResourceID" as a parameter.
So, it creates an error because of the letter 'd', to solve the error just replace "stringResourceId" with "stringResourceID" at the line number 44 in file "affirmations/adapter/ItemAdapter.kt".
Or
Replace "stringResourceID" with "stringResourceId" at the line number 3 in file "affirmations/model/Affirmation.kt".
Steps to reproduce?
Versions
What version of Android Studio are you using?
Version 4.2.1
Additional information
Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered: