title: Cannot resolve symbol ‘ActivityTestRule’ on androidx
body: <p>I'm trying to test my Activity, but couldn't able to import ActivityTestRule.</p>
  <p><strong>My gradle file</strong></p>
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'com.google.gms.google-services'
  // Add the Firebase Crashlytics plugin.
  apply plugin: 'com.google.firebase.crashlytics'
  android {
      compileSdkVersion 30
      defaultConfig {
          applicationId &quot;com.example”
          minSdkVersion 23
          targetSdkVersion 30
          versionCode 3
          versionName &quot;1.3&quot;
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
      packagingOptions {
          exclude 'META-INF/DEPENDENCIES'
          exclude 'META-INF/INDEX.LIST'
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
          debug {
              testCoverageEnabled true
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
      testOptions {
          unitTests.returnDefaultValues = true
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.appcompat:appcompat:1.2.0'
      implementation 'androidx.constraintlayout:constraintlayout:2.0.3'
      testImplementation 'junit:junit:4.13.1'
      androidTestImplementation 'androidx.test.ext:junit:1.1.2'
      implementation 'com.google.android.material:material:1.2.1'
      androidTestImplementation 'org.junit.jupiter:junit-jupiter:5.7.0'
      testImplementation 'org.objenesis:objenesis:2.6'
      // Espresso Core library
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  // AndroidJUnitRunner and JUnit Rules
      androidTestImplementation 'androidx.test:runner:1.3.0'
      androidTestImplementation 'androidx.test:rules:1.3.0'
      // Optional -- UI testing with UI Automator
      androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
      
  }
  </code></pre>
  <p><strong>Edit</strong>
  I have tried  ActivityScenarioRule also. The same issue, cannot resolve symbol ActivityScenarioRule</p>
  <pre><code>public ActivityScenarioRule rule = new ActivityScenarioRule&lt;&gt;(LoginActivity.class);
  </code></pre>