title: Instrumentation Tests faild due to NoClassDefFoundError
body: <p>I'm multidexing my kotlin app since today in the debug mode because a library has forced me to do so. My problem is that my UI-Tests aren't working anymore. I'm also minifying my apk. </p>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>FATAL EXCEPTION: MockWebServer
  Process: [package], PID: 19446
  java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/collections/CollectionsKt;
      at [package].activity.MockedServerTestsBase$dispatcher$1.dispatch(Unknown Source)
      at okhttp3.mockwebserver.MockWebServer$3.processOneRequest(Unknown Source)
      at okhttp3.mockwebserver.MockWebServer$3.processConnection(Unknown Source)
      at okhttp3.mockwebserver.MockWebServer$3.execute(Unknown Source)
      at okhttp3.internal.NamedRunnable.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
      at java.lang.Thread.run(Thread.java:761)
  Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlin.collections.CollectionsKt" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/[package].test-2/base.apk", zip file "/data/app/[package]-1/base.apk"],nativeLibraryDirectories=[/data/app/[package].test-2/lib/x86, /data/app/[package]-1/lib/x86, /system/lib, /vendor/lib]]
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      at [package].activity.MockedServerTestsBase$dispatcher$1.dispatch(Unknown Source) 
      at okhttp3.mockwebserver.MockWebServer$3.processOneRequest(Unknown Source) 
      at okhttp3.mockwebserver.MockWebServer$3.processConnection(Unknown Source) 
      at okhttp3.mockwebserver.MockWebServer$3.execute(Unknown Source) 
      at okhttp3.internal.NamedRunnable.run(Unknown Source) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
      at java.lang.Thread.run(Thread.java:761) 
  </code></pre>
  
  <p>Has anyone received this error who is also using the OkHttp MockWebServer? Or something else. Maybe I'm missing some proguard rules?</p>
  
  <p>My app/build.gradle file:</p>
  
  <pre><code>android {
      defaultConfig {
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
  
      buildTypes {
          debug {    
              debuggable true
              minifyEnabled true
              dexOptions {
                  multiDexEnabled true
              }
      }
  }
  
  dependencies {
      implementation "org.jetbrains.kotlin:kotlin-stdlib:1.1.60"
  
      androidTestImplementation "com.squareup.okhttp3:mockwebserver:3.8.1"
      androidTestImplementation "com.android.support.test:runner:1.0.1"
      androidTestImplementation "com.android.support.test:rules:1.0.1"
  }
  </code></pre>
  
  <p>I'd be thankful for any help and/or discussion if my approach is right.</p>