title: Caused by: java.lang.NoSuchMethodError: No static method listOf(Ljava/lang/Object;)Ljava/util/List; in class Lk/v/i; or its super classes
body: <p>I'm using <code>kotlin collections library (listOf, first, toList, etc,..</code>) methods in our <code>AndroidTest</code> package to run UI tests using <code>AndroidJunit4 runner</code> and I'm coming across these type of errors wherever I refer to kotlin collections library.</p>
  <pre><code>java.lang.NoSuchMethodError: No static method listOf(Ljava/lang/Object;)Ljava/util/List; in class Lk/v/i; or its super classes (declaration of 'k.v.i' appears 
  </code></pre>
  <p>The strange thing is I don't see any issues in Compile time nor when I run tests independently at the class level. The issue happens only when I run the whole test suite using Gradle</p>
  <p>This is the command I use to run the UI test suite using Gradle</p>
  <pre><code>./gradlew connectedCheck --info --full-stacktrace --no-build-cache --debug
  </code></pre>
  <p>What I'm suspecting is the classes that get loaded during runtime seems to be different from compile time</p>
  <p>Here's the <code>build.gradle</code> dependencies</p>
  <pre><code>
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.71&quot;
  
      //  Instrumented Tests
      testImplementation &quot;androidx.test:core:1.2.0&quot;
      androidTestImplementation 'androidx.test.ext:junit:1.1.1' 
      androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
      androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' 
      
  
    defaultConfig {
      testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
    }
  
  </code></pre>