title: Android R.string ids mix in multi-module tests
body: <p>My app is implemented as a multi-module project (with dynamics module), where there is a shared module with espresso tests. These espresso tests give me different outcomes depending if I run them from Android Studio or from the command line.</p>
  <p>The issue I find when I run the tests from the command line is that it tries to assert against the wrong string resources.</p>
  <p>The actual tests code is asserting this, where <code>R.string.home_activity_title</code> value is &quot;Hello&quot;:</p>
  <pre><code>assertDisplayed(R.string.home_activity_title)
  </code></pre>
  <p>However when it is run from the command line, the assertion fails with this output</p>
  <pre><code>No views in hierarchy found matching: with string from resource id: &lt;2131886676&gt;[send_message_hint] value: Type a message…
  </code></pre>
  <p>Notice how the tests from the command line is trying to assert against a different string that the one is defined on the test.</p>
  <p>I tried to understand the difference between running the tests from AndroidStudio and running them from the command line but I am clearly missing something here. This is how I run the tests from the command line</p>
  <pre><code>apk=&quot;path/to/apk&quot;
  testApk=&quot;path/to/test/apk&quot;
  testRunner=&quot;my.custom.test.runner&quot;
  
  # Generate universal APK
  echo &quot;Generating universal APK&quot;
  sh build_develop.sh
  
  # Install universal APK on emulator
  echo &quot;Installing universal APK&quot;
  adb uninstall &lt;appPackage&gt;
  adb install -t $apk
  
  echo &quot;Building test APK&quot;
  ./gradlew :testModule:assembleDebugAndroidTest
  
  echo &quot;Installing Test APK&quot;
  adb uninstall &lt;testApkPackage&gt;
  adb install -t $testApk
  
  echo &quot;Running Acceptance Tests&quot;
  # Run all acceptance tests
  adb shell am instrument -w $testRunner
  </code></pre>