ViewModelProviders.of(getActivity()) "Cannot resolve method of(android.app.Activity)"
ViewModelProviders
requires that you use FragmentActivity
(or something derived from it), not Activity
, as the base class of your activities.
ViewModelProviders
requires that you use FragmentActivity
(or something derived from it), not Activity
, as the base class of your activities.