Can't find ViewModelProviders class, only ViewModelProvider

You probably have this dependency included in your project:

implementation "android.arch.lifecycle:viewmodel:$lifecycle_version"

That contains ViewModelProvider (and just 4 other classes), but ViewModelProviders is in a different package:

implementation "android.arch.lifecycle:extensions:$lifecycle_version"

Here are the contents of these packages for reference (as of version 1.1.1):

The contents of the extensions and viewmodel packages


For the record, you can find this out yourself by looking up the docs for the ViewModelProviders class, where it says up top:

added in version 1.1.0

belongs to Maven artifact android.arch.lifecycle:extensions:1.1.1