title: Tests on test(AVD) - failed: Instrumentation run failed due to 'java.io.IOException'
body: <p>I get this error when running my <strong>Cucumber-jvm</strong> tests with <strong>Gradle</strong> on an <strong>Android emulator</strong>.</p>
  
  <p>The exact same tests run perfectly on a device but I need to run them on emulator to perform the tests on Travis CI</p>
  
  <p>The debug error:</p>
  
  <pre><code>Executing task ':app:connectedDebugAndroidTest' (up-to-date check took 0.0 secs) due to:
    Task has not declared any outputs.
  deleteDir(/home/travis/build/neoranga55/Experiment-CI/app/build/outputs/androidTest-results/connected) returned: true
  deleteDir(/home/travis/build/neoranga55/Experiment-CI/app/build/outputs/code-coverage/connected) returned: true
  Starting 0 tests on test(AVD) - 5.0.2
  Tests on test(AVD) - 5.0.2 failed: Instrumentation run failed due to 'java.io.IOException'
  
  com.android.builder.testing.ConnectedDevice &gt; No tests found.[test(AVD) - 5.0.2] [31mFAILED [0m
  No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).
  deleteDir(/home/travis/build/neoranga55/Experiment-CI/app/build/reports/androidTests/connected) returned: true
  :app:connectedDebugAndroidTest FAILED
  :app:connectedDebugAndroidTest (Thread[main,5,main]) completed. Took 3 mins 13.635 secs.
  
  FAILURE: Build failed with an exception.
  </code></pre>
  
  <p>The full log of execution and fail:
  <a href="https://s3.amazonaws.com/archive.travis-ci.org/jobs/81209650/log.txt" rel="nofollow">https://s3.amazonaws.com/archive.travis-ci.org/jobs/81209650/log.txt</a></p>
  
  <p>This is the CucumberTestCase.class I created to configure which tests will be executed by Cucumber and where the results will be placed using the <strong>@CucumberOptions</strong>:</p>
  
  <pre><code>import cucumber.api.CucumberOptions;
  
  /**
   * This class configures the Cucumber test framework and Java glue code
   */
  @CucumberOptions(features = "features", // Test scenarios
          glue = {"com.neoranga55.cleanguitestarchitecture.cucumber.steps"}, // Steps definitions
          format = {"pretty", // Cucumber report formats and location to store them in phone
                  "html:/mnt/sdcard/cucumber-reports/html-report",
                  "json:/mnt/sdcard/cucumber-reports/cucumber.json",
                  "junit:/mnt/sdcard/cucumber-reports/cucumber.xml"
          },
          tags={"~@manual", "@login-scenarios"}
  )
  public class CucumberTestCase {
  }
  </code></pre>
  
  <p>The command to launch is:</p>
  
  <pre><code>./gradlew connectedAndroidTest -PdisablePreDex --stacktrace --info
  </code></pre>