The APIs in lifecycle-extensions have been deprecated. Instead, add dependencies for the specific Lifecycle artifacts you need. code example

Example: replace ViewModelProviders.of android x

JAVA
replace :
customViewModel    = ViewModelProviders.of(this).get(CustomViewModel.class);

with:
customViewModel    = new ViewModelProvider(this).get(CustomViewModel.class);


KOTLIN
replace:
customViewModel    = ViewModelProviders.of(this).get(CustomViewModel::class.java)

with:
customViewModel    = ViewModelProvider(this).get(CustomViewModel::class.java)

Tags:

Misc Example