title: Espresso not finding test apk
body: <p>Im building a test suite for my app, but keep getting the following error when trying to run a test on an emulator:</p>
  
  <blockquote>
    <p>$ adb push /Users/me/dev/Android/app/build/outputs/apk/debug/app-debug.apk /data/local/tmp/myApp.debug</p>
    
    <p>$ adb shell pm install -t -r "/data/local/tmp/myApp.debug"
        pkg: /data/local/tmp/myApp.debug
    Success</p>
    
    <p><strong>The APK file /Users/me/dev/Android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk does not exist on disk.
    Error while Installing APK</strong></p>
  </blockquote>
  
  <p>The real debug file i want the tests to run against is located at:</p>
  
  <blockquote>
    <p>/Users/me/dev/Android/app/build/outputs/apk/debug/app-debug.apk</p>
  </blockquote>
  
  <p>I have the following setup in gradle:</p>
  
  <pre><code>    android.defaultConfig {
         testInstrumentationRunner 
      'android.support.test.runner.AndroidJUnitRunner'
      }
  
      ...
      dependencies {
      testCompile 'junit:junit:4.12'
      androidTestCompile 'com.android.support.test:runner:1.0.1'
      androidTestCompile 'com.android.support.test:rules:1.0.1'
  
      // Espresso support
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
  
      // add this for intent mocking support
      androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1'
      }
  </code></pre>
  
  <p>Any idea how i can configure the test runner to look for the debug apk in the correct directory?</p>
  
  <p>Thanks in advance :)</p>
  
  <p>UPDATE -
  Things i have tried already are:</p>
  
  <ol>
  <li>./gradlew connecteAndroidTest</li>
  <li>./gradlew assembleDebug</li>
  <li>./gradlew assembleDebugAndroidTest</li>
  <li>Creating a new test runner from Edit Configuration</li>
  </ol>