title: ReferenceError: Can't find variable: Permissions and ReferenceError: Can't find variable: ImagePicker
body: <p>I ejected my react-native project and am testing it with android studio. However, I keep getting the error:</p>
  
  <p>ReferenceError: Can't find variable: Permissions
  ReferenceError: Can't find variable: ImagePicker</p>
  
  <p>I have an upload button that lets the user take a picture with their camera and upload a picture.</p>
  
  <p>This is the react-native code for the upload function:</p>
  
  <pre><code>import React from "react";
  import { TextInput, ActivityIndicator, Image, TouchableOpacity, View, Text, StyleSheet } from "react-native";
  import { f, auth, database, storage } from "../config/config.js";
  import UserAuth from "../components/auth.js";
  
  
      _checkPermissions = async () =&gt; {
          const { status } = await Permissions.askAsync(Permissions.CAMERA);
          this.setState({
              camera: status
          });
  
          // take permission for Gallery, aka CameraRoll
          const { statusRoll } = await Permissions.askAsync(Permissions.CAMERA_ROLL);
          this.setState({
              cameraRoll: statusRoll
          });
      };
  
  
  
  
  
      findNewImage = async () =&gt; {
          this._checkPermissions();
  
          let result = await ImagePicker.launchCameraAsync({
              mediaTypes: "Images",
              allowsEditing: true,
              quality: 1
          });
  
          console.log("image picked is = result = ", result);
  
          if (!result.cancelled) {
  
              console.log("upload image");
              this.setState({
                  imageSelected: true,
                  imageId: this.uniqueId(),
                  uri: result.uri
              });
  
          } else {
  
              console.log("cancel");
              this.setState({
                  imageSelected: false
              });
  
          }
      };
  
  
  </code></pre>
  
  <p>This is the error message in android studio:</p>
  
  <pre><code>W/ReactNativeJS: Possible Unhandled Promise Rejection (id: 9):
      ReferenceError: Can't find variable: Permissions
      _callee$@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141092:62
      tryCatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23066:23
      invoke@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23241:32
      tryCatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23066:23
      invoke@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23142:30
      http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23172:19
      tryCallTwo@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24367:9
      doResolve@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24531:25
      Promise@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24390:14
      callInvokeWithMethodAndArg@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23171:29
      enqueue@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23176:157
      async@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23192:69
      _callee@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141087:42
      _callee2$@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141135:40
      tryCatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23066:23
      invoke@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23241:32
      tryCatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23066:23
      invoke@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23142:30
      http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23172:19
      tryCallTwo@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24367:9
      doResolve@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24531:25
      Promise@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24390:14
      callInvokeWithMethodAndArg@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23171:29
      enqueue@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23176:157
      async@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23192:69
      _callee2@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141131:42
      onPress@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141451:39
      touchableHandlePress@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:51687:47
      touchableHandlePress@[native code]
      _performSideEffectsForTransition@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:50367:36
      _performSideEffectsForTransition@[native code]
      _receiveSignal@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:50293:46
      _receiveSignal@[native code]
      touchableHandleResponderRelease@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:50172:26
      touchableHandleResponderRelease@[native code]
      invokeGuardedCallbackImpl@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8533:21
      invokeGuardedCallback@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8624:42
      invokeGuardedCallbackAndCatchFirstError@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8628:36
      executeDispatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8822:48
      executeDispatchesInOrder@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8842:26
      executeDispatchesAndRelease@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8937:35
      forEach@[native code]
      forEachAccumulated@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8927:22
      runEventsInBatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:9031:27
      runExtractedEventsInBatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=
  W/ReactNativeJS: Possible Unhandled Promise Rejection (id: 10):
      ReferenceError: Can't find variable: ImagePicker
      _callee2$@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141138:62
      tryCatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23066:23
      invoke@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23241:32
      tryCatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23066:23
      invoke@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23142:30
      http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23172:19
      tryCallTwo@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24367:9
      doResolve@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24531:25
      Promise@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:24390:14
      callInvokeWithMethodAndArg@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23171:29
      enqueue@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23176:157
      async@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:23192:69
      _callee2@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141131:42
      onPress@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:141451:39
      touchableHandlePress@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:51687:47
      touchableHandlePress@[native code]
      _performSideEffectsForTransition@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:50367:36
      _performSideEffectsForTransition@[native code]
      _receiveSignal@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:50293:46
      _receiveSignal@[native code]
      touchableHandleResponderRelease@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:50172:26
      touchableHandleResponderRelease@[native code]
      invokeGuardedCallbackImpl@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8533:21
      invokeGuardedCallback@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8624:42
      invokeGuardedCallbackAndCatchFirstError@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8628:36
      executeDispatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8822:48
      executeDispatchesInOrder@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8842:26
      executeDispatchesAndRelease@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8937:35
      forEach@[native code]
      forEachAccumulated@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:8927:22
      runEventsInBatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:9031:27
      runExtractedEventsInBatch@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:9038:25
      http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:10005:36
      batchedUpdates$1@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:21211:20
      batchedUpdates@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:9947:37
      _receiveRootNodeIDEvent@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:10004:23
      receiveTouches@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:10034:34
      __callFunction@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:2575:49
      http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:2332:31
      __guard@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:2529:15
      callFunctionReturnFlushedQueue@http://10.0.2.2:8081/index.delta?platform=android&amp;dev=true&amp;minify=false:2331:21
      callFunctionReturnFlushedQueue@[native code]
  
  </code></pre>