title: Detox(Android): device.reloadReactNative fails
body: <h2>Scenario</h2>
  
  <p>I am trying to test an android app for a react-native project using detox.
  When running the app on a device or a simulator outside of detox, everything works. </p>
  
  <p>After generating the detox build, when I run the detox test command, the app is successfully installed and opened on the simulator. When <code>device.reloadReactNative</code> is called via <code>beforeEach</code> within the tests, the app crashes with the error described below.
  I put the test file and the corresponding verbose adb <a href="https://gist.github.com/shrink0r/ea8d5ac56bf055d5e5e91872418759f9#file-logcat-log-L93" rel="nofollow noreferrer">logcat</a> output in a <a href="https://gist.github.com/shrink0r/ea8d5ac56bf055d5e5e91872418759f9" rel="nofollow noreferrer">gist here</a>.</p>
  
  <p>For whatever reason the <a href="https://github.com/facebook/react-native/blob/master/Libraries/ReactNative/AppRegistry.js#L242" rel="nofollow noreferrer">AppRegistry.js</a> is not being loaded, otherwise the module should be known (see Error). </p>
  
  <p>To wrap it up:</p>
  
  <ul>
  <li>build and app execution work outside detox (ios+android)</li>
  <li>detox build works (ios+android)</li>
  <li>detox tests work on ios</li>
  <li>when running the detox tests on android, the AppRegistry is missing after <code>reloadReactNative</code> is called. Why?</li>
  </ul>
  
  <h2>Env</h2>
  
  <ul>
  <li>react-native-cli: 1.3.0  </li>
  <li>react-native: 0.55.3  </li>
  <li>react-native-navigation: 1.1.457  </li>
  <li>detox-server: 7.0.0</li>
  <li>detox: 7.3.7</li>
  <li>OSX: 10.13.4</li>
  <li>XCode: 9.2</li>
  </ul>
  
  <h2>Command</h2>
  
  <pre><code>detox test --configuration android.emu.release --cleanup -l verbose
  </code></pre>
  
  <h2>Error</h2>
  
  <blockquote>
    <p>INSTRUMENTATION_RESULT:
    longMsg=com.facebook.react.common.JavascriptException: Module
    AppRegistry is not a registered callable module (calling
    runApplication)</p>
  </blockquote>
  
  <p><a href="https://github.com/facebook/react-native/blob/33ffa79a51d4db9ba69148861f2da304646175cd/Libraries/BatchedBridge/MessageQueue.js#L334" rel="nofollow noreferrer">Thrown here</a> because <code>AppRegistry</code> has not been registered to the MessageQueue's module list.</p>