I have been trying to create an Object of ViewModel in an Activity but ViewModelProviders is deprecated So what\'s the alternative to create the ViewModel\'s object.
As ViewModelProviders got deprecated. You can now use the ViewModelProvider constructor directly. For more details how to use it, check here.