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

Apache License 2.0
103 stars 163 forks source link

Android Basics: Shared ViewModel : crashing after init #90

Closed TiffanyTesla closed 10 months ago

TiffanyTesla commented 1 year ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-training-shared-viewmodel?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-shared-viewmodel#6

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

  1. Update pickup and summary fragment to use view model
    1. Run your app again, notice today's date is selected by default.

Describe the problem app crashes upon clicking on any item on first fragment. Reversal of steps or making it to where "init" does not function allows for all to not crash

Steps to reproduce?

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

Versions Android Studio version: electric eel API version of the emulator: 31

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