ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.12k stars 1.56k forks source link

Undefined is not an object (evaluating ImagePicker.openCamera) #786

Open sunithakk opened 6 years ago

sunithakk commented 6 years ago

Version

{ "name": "img", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "native-base": "^2.7.2", "react": "16.4.1", "react-native": "0.55.2", "react-native-easy-grid": "^0.2.0", "react-native-image-crop-picker": "^0.20.3", "react-navigation": "^2.9.3" }, "devDependencies": { "babel-jest": "23.4.0", "babel-preset-react-native": "4.0.0", "jest": "23.4.1", "react-test-renderer": "16.4.1" }, "jest": { "preset": "react-native" } }

Platform

Expected behaviour

Actual behaviour

Undefined is not an object (evaluating ImagePicker.openCamera)

shubham1164 commented 5 years ago

Have anybody solved it?

paul019 commented 5 years ago

+1 (I've the problem also with openPicker...)

MahmoudMH commented 5 years ago

Same problem with Expo app :-1:

ChristianTucker commented 5 years ago

Same issue.

tmjordan commented 5 years ago

make sure to correctly link the library to your ios and android projects. To use with expo, you muste eject your expo project first, then link the library.

Stoneski93 commented 5 years ago

Try link manually

For manual solution, add the following on your MainApplication.java import com.reactnative.ivpusic.imagepicker.PickerPackage;

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new PickerPackage(), // <== add this
            ....
fabellonnoe commented 4 years ago

I got rid of this by adding folder react-native-image-crop-picker inside node_modules and run cd ios pod install