In which task and step of the codelab can this issue be found?
Understand ViewModel lifecycle
Step 3.: Add a log statement inside onCleared() to track the GameViewModel lifecycle.
Describe the problem
I added the log statement as expected and tested it on an emulator with API level 31 (Nexus 5).
I realized that the log message is never displayed in Logcat. I trust in Logcat and the Log library's functionality, so I searched "gameviewmodel oncleared is not called", which led me to this issue:
https://github.com/android/architecture-components-samples/issues/337
URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-training-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-viewmodel#5
In which task and step of the codelab can this issue be found? Understand ViewModel lifecycle Step 3.: Add a log statement inside onCleared() to track the GameViewModel lifecycle.
Describe the problem I added the log statement as expected and tested it on an emulator with API level 31 (Nexus 5). I realized that the log message is never displayed in Logcat. I trust in Logcat and the Log library's functionality, so I searched "gameviewmodel oncleared is not called", which led me to this issue: https://github.com/android/architecture-components-samples/issues/337
Steps to reproduce?
Versions Android Studio version: 4.3.1 API version of the emulator: 31
Additional information Include screenshots if they would be useful in clarifying the problem.