title: Android instrumentation test fails in Jenkins, but works in local machine
body: <p>My Android studio project has unit and instrumentation tests. I have integrated Jenkins for continuous integration and the Jenkins version is <code>2.204.1</code>.
  Recently I have upgraded my Gradle version to <code>3.4.1</code> initially it was <code>2.3.1</code>, after updating the Gradle, I also need to update my instrumentation test with @Before and @After annotations after making these changes instrumentation runs successfully on my local machine.</p>
  <p>But when I run the job on Jenkins with execute shell command <code>&quot;sh $WORKSPACE/ci/run_small_tests.sh&quot;</code> my some test fails with error <code>&quot;junit.framework.AssertionFailedError: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object&quot;</code></p>
  <p>In these instrumentation tests, I am accessing some resource files from the device.
  Anyone faced such an issue, help is much appreciated</p>