Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Android Kotlin Fundamentals codelab: deprecated syntax used #180

Closed
gcrosti opened this issue May 28, 2020 · 1 comment
Closed

Android Kotlin Fundamentals codelab: deprecated syntax used #180

gcrosti opened this issue May 28, 2020 · 1 comment

Comments

@gcrosti
Copy link

gcrosti commented May 28, 2020

Describe the problem
This syntax to instantiate a ViewModel is deprecated according to the Android docs:
ViewModelProviders.of(this).get(GameViewModel::class.java)
Would love guidance on what I should use! I replaced with:
viewModel = ViewModelProvider(this).get(GameViewModel::class.java)

In which lesson and step of the codelab can this issue be found?
Step 5 of Android Fundamentals 05.1

How to reproduce?
na

Versions
na

Additional information
na

codelab: android-kotlin-fundamentals

@kkuan2011
Copy link

Duplicate of #33

@kkuan2011 kkuan2011 marked this as a duplicate of #33 Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants