title: Cannot read property 'oneOfType' of undefined
body: <p>I am new to react native. I want to use 'react-native-camera'. I created a new project , installed the package correctly(I know because I have done it thrice to make sure that i'm not doing anything wrong) and it shows this error **Cannot read property 'oneOfType' of undefined ** and it is in index.js of this package 'react-native-camera'. I can't find any solution. I have tried changing gradle version, gradle wrapper properties everything that I could but this issue is not related to gradle. This is the code in my App.js. I know code isn't generating this error but i am new to react-native so maybe i'm missing something.
  Any suggestion would be appreciated </p>
  
  <pre><code> import React, {Component} from 'react';
     import {
     Text,
     View,
    StyleSheet
  
   } from 'react-native';
  
   import Camera from 'react-native-camera';
  
   export default class BarcodeScan extends Component {
  
    constructor(props) {
      super(props);
      this.state = {
          qrcode: ''
      }
  }
  
   onBarCodeRead = (e) =&gt; this.setState({qrcode: e.data});
  
   render () {
      return (
          &lt;View  style={styles.container}&gt;
              &lt;Camera
                  style={styles.preview}
                  onBarCodeRead={this.onBarCodeRead}
                  ref={cam =&gt; this.camera = cam}
                  aspect={Camera.constants.Aspect.fill}
                  &gt;
                      &lt;Text style={{
                          backgroundColor: 'white'
                      }}&gt;{this.state.qrcode}&lt;/Text&gt;
                  &lt;/Camera&gt;
            &lt;/View&gt;
          )
      }
  
  }
  
    const styles = StyleSheet.create({
    container: {
     flex: 1,
     flexDirection: 'row',
    },
     preview: {
     flex: 1,
     justifyContent: 'flex-end',
     alignItems: 'center'
    }
    });
  </code></pre>