This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
Android Kotlin Fundamentals codelab: Lesson 5.1 uses deprecated class #166
Labels
duplicate
This issue or pull request already exists
The problem
The kotlin code for viewmodel has not been updated. It still uses
ViewModelProviders.of()
which has been deprecated.In which lesson and step of the codelab can this issue be found?
in Android Kotlin Fundamentals 05.1: ViewModel and ViewModelFactory, Step 4.
How to reproduce?
if you follow the instructions in the codelab then you can reproduce it.
Versions
Additional information
It can be corrected by using
ViewModelProvider(this).get(GameViewModel::class.java
and addingkotlinOptions{ jvmTarget="1.8"}
to build.gradle(project level)codelab: android-kotlin-fundamentals
The text was updated successfully, but these errors were encountered: