title: react-native-camera Cannot read property 'Constants' of undefined on android
body: <p>I'm aware of <a href="https://github.com/react-native-community/react-native-video/issues/354" rel="nofollow noreferrer">this</a> issue.
  I have installed and configured the react-native-camera this way:</p>
  
  <pre><code>yarn add react-native-camera --save
  react-native link react-native-camera 
  </code></pre>
  
  <p>added these to <strong>AndroidManifest.xml</strong>:</p>
  
  <pre><code>  &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
    &lt;uses-permission android:name="android.permission.RECORD_AUDIO"/&gt;
    &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
    &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>I'm using <a href="https://github.com/react-native-community/react-native-camera/blob/master/docs/RNCamera.md" rel="nofollow noreferrer">this</a> basic code:</p>
  
  <pre><code> &lt;RNCamera
            ref={ref =&gt; {
              this.camera = ref;
            }}
            style={styles.preview}
            type={RNCamera.Constants.Type.back}
            flashMode={RNCamera.Constants.FlashMode.on}
            androidCameraPermissionOptions={{
              title: 'Permission to use camera',
              message: 'We need your permission to use your camera',
              buttonPositive: 'Ok',
              buttonNegative: 'Cancel',
            }}
            androidRecordAudioPermissionOptions={{
              title: 'Permission to use audio recording',
              message: 'We need your permission to use your audio',
              buttonPositive: 'Ok',
              buttonNegative: 'Cancel',
            }}
            onGoogleVisionBarcodesDetected={({ barcodes }) =&gt; {
              console.log(barcodes);
            }}
          /&gt;
  </code></pre>
  
  <p>And get this error:</p>
  
  <blockquote>
    <p>ExceptionsManager.js:74 TypeError: TypeError: Cannot read property 'Constants' of undefined</p>
  </blockquote>