title: Instrumentation run failed due to 'java.lang.RuntimeException' with Spoon?
body: <p>I am trying to make Spoon work with Gradle, therefore I use this plugin:</p>
  
  <p><a href="https://github.com/stanfy/spoon-gradle-plugin" rel="nofollow">https://github.com/stanfy/spoon-gradle-plugin</a></p>
  
  <p>I use Espresso for writing the UI Tests</p>
  
  <p>Basically it seems to work, I can start the gradle task via command line, it finds the connected device and also creates a report.</p>
  
  <p>In just fails, and in the report I have a error message:</p>
  
  <p>Instrumentation run failed due to 'java.lang.RuntimeException'</p>
  
  <p>My console output:</p>
  
  <pre><code>02:28:59 D/app-myproject-debug.apk: Uploading app-myproject-debug.apk onto device '1fd0b003'
  02:28:59 D/Device: Uploading file onto device '1fd0b003'
  02:29:06 D/app-myproject-debug-test-unaligned.apk: Uploading app-myproject-debug-test-unaligned.apk onto device '1fd0b003'
  02:29:07 D/Device: Uploading file onto device '1fd0b003'
  2014-08-07 14:29:14 [SDR.run] About to actually run tests for [1fd0b003]
  02:29:14 I/RemoteAndroidTest: Running am instrument -w -r  com.bonial.myproject.test/com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner on samsung-sm_n9005-1fd0b003
  02:29:27 I/InstrumentationResultParser: test run failed: 'Instrumentation run failed due to 'java.lang.IllegalStateException''
  2014-08-07 14:29:27 [STRL.testRunStarted] testCount=0 runName=com.bonial.myproject.test
  2014-08-07 14:29:27 [STRL.testRunFailed] errorMessage=Instrumentation run failed due to 'java.lang.IllegalStateException'
  2014-08-07 14:29:27 [STRL.testRunEnded] elapsedTime=0
  02:29:27 I/XmlResultReporter: XML test result file generated at /Users/daniel/android/app/build/spoon/myproject/debug/junit-reports/1fd0b003.xml. Total tests 0, Failed 0, Error 0
  2014-08-07 14:29:27 [SDR.run] About to grab screenshots and prepare output for [1fd0b003]
  2014-08-07 14:29:27 [SDR.run] Pulling screenshots from [1fd0b003] /data/data/com.packagename.myproject/app_spoon-screenshots
  2014-08-07 14:29:27 [SR.runTests] [1fd0b003] Execution done.
  02:29:30 D/ddms: Waiting for Monitor thread
  :app:spoonMyprojectDebugTest FAILED
  </code></pre>