Null is not an object (evaluating 'ImageCropPicker.openPicker')
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?
if you are using expo + react native combination, use expo run:android after installation, it helped me :)
if you are using expo + react native combination, use
expo run:androidafter installation, it helped me :)
Thanks for the response. Unfortunately, I am not using expo and this error is still occurring :(
@AntonioLi1 Can you share the code for getting this issue?
I experienced this problem. Did you happen to get the fix? Thanks
@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 :(
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!
ios
cd ios && pod install && cd ..
npx react-native run-ios
android
npx react-native run-android
I changed the import to - import {ImageCropPicker} from 'react-native-image-crop-picker';