title: Cannot resolve symbol ViewModelProviders
body: <p>I am working on Android ViewModel architecture component but I am getting the above mentioned error when trying to initialize a ViewModel in an AppCompatActivity.</p>
  
  <pre><code>import android.arch.lifecycle.ViewModelProviders;
  ViewModelProviders.of(this).get(CounterViewModel.class);
  </code></pre>
  
  <p>There are a few questions and articles related to this, and they pointed towards adding the <code>lifecycle:extensions</code> and <code>lifecycle:viewmodel</code> dependencies in the app gradle file, but I am still getting the error.</p>
  
  <pre><code>implementation "android.arch.lifecycle:extensions:1.1.1"
  implementation "android.arch.lifecycle:viewmodel:1.1.1"
  annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
  </code></pre>
  
  <p>The package android.arch.lifecycle does not contain the class <code>ViewModelProviders</code> and it only has <code>ViewModelProvider</code> class.</p>
  
  <p>What else needs to be added to access the <code>ViewModelProviders</code> class?</p>
  
  <p>Edit : </p>
  
  <p>Dependencies in app/build.gradle:</p>
  
  <pre><code>dependencies {
      implementation project(':lifecycle')
      implementation project(':base')
      implementation "android.arch.lifecycle:extensions:1.1.1"
      implementation "android.arch.lifecycle:viewmodel:1.1.1"
      annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/yn2vb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yn2vb.png" alt="enter image description here"></a></p>