title: Android. Where did ApplicationProvider go?
body: <p>I'm trying to run this line:</p>
  
  <p><code>Context context = ApplicationProvider.getApplicationContext();</code></p>
  
  <p>Sample code such as <a href="https://developer.android.com/training/data-storage/room/testing-db#java" rel="noreferrer">https://developer.android.com/training/data-storage/room/testing-db#java</a> recommends it.</p>
  
  <p>But I can't import ApplicationProvider (and I just LOVE how the documentation never imports anything, assuming your editor will prompt you correctly...). This line fails, with "error: package androidx.test.core.app does not exist":</p>
  
  <p><code>import androidx.test.core.app.ApplicationProvider;</code></p>
  
  <p>So where did ApplicationProvider go? I'm trying to use the current context to create a Room database:</p>
  
  <pre><code>        Context context = ApplicationProvider.getApplicationContext();
          db = Room.inMemoryDatabaseBuilder(context, TestDatabase.class).build();
          userDao = db.getUserDao();
  </code></pre>