title: ViewModelProviders.of(getActivity()) "Cannot resolve method of(android.app.Activity)"
body: <p>I'm currently trying to share data between my two fragments with the help of a view model <a href="https://developer.android.com/topic/libraries/architecture/viewmodel.html#implement" rel="noreferrer">Android ViewModels</a>. </p>
  
  <p>In the this article they use "ViewModelProviders.of(getActivity()).get(SharedViewModel.class);" in the Fragment to get the model.</p>
  
  <p>My Problem is, that when I write the exact same line into my fragment, I get a "Cannot resolve method of(android.app.Activity)" error</p>
  
  <pre><code>model = ViewModelProviders.of(getActivity()).get(UserAccountViewModel.class);
  </code></pre>
  
  <p>Can some one help me with this ?</p>