react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

Null is not an object (evaluating 'ImageCropPicker.openPicker')

Open AntonioLi1 opened this issue 3 years ago • 9 comments

Version

  • react-native-image-crop-picker v0.38.01
  • react-native v0.69.5

Platform

  • Android

Hi everyone! I followed all the installation steps for android. But as soon as I import "import ImagePicker from 'react-native-image-crop-picker';" into my file, i receive the error saying: TypeError: null is not an object (evaluating 'ImageCropPicker.openPicker')

Anyone else experience this? What would the solution be?

AntonioLi1 avatar Dec 02 '22 23:12 AntonioLi1

if you are using expo + react native combination, use expo run:android after installation, it helped me :)

Memoriarty1 avatar Dec 05 '22 10:12 Memoriarty1

if you are using expo + react native combination, use expo run:android after installation, it helped me :)

Thanks for the response. Unfortunately, I am not using expo and this error is still occurring :(

AntonioLi1 avatar Dec 06 '22 22:12 AntonioLi1

@AntonioLi1 Can you share the code for getting this issue?

galaxyreal avatar Dec 06 '22 22:12 galaxyreal

I experienced this problem. Did you happen to get the fix? Thanks

paulinavita avatar Mar 06 '23 06:03 paulinavita

@AntonioLi1 Can you share the code for getting this issue?

I experienced this problem. Did you happen to get the fix? Thanks

Hey guys, Really sorry, i didn't end up finding a solution :(

AntonioLi1 avatar Mar 06 '23 10:03 AntonioLi1

Hi @AntonioLi1, I was struggling with this the whole day of today on android, but after trying on ios it worked and I immediately realised what the issue might have been. I would recommend uninstalling the app and re-installing it again, whether on the phone or the android emulator. I suspect the reason being because there are some gradle changes, they need to be rebuild again into the app. Hope it helps!

JamesRobert20 avatar Apr 27 '23 05:04 JamesRobert20

ios

cd ios && pod install && cd ..
npx react-native run-ios

android

npx react-native run-android

ReactNativ avatar May 09 '23 10:05 ReactNativ

I changed the import to - import {ImageCropPicker} from 'react-native-image-crop-picker';

ArtemShakun avatar Mar 04 '24 11:03 ArtemShakun