react-native-image-picker: [π] [TypeError: null is not an object (evaluating 'nativeImagePicler.launchCamera')]
Description
Explain the bug in as much detail as possible
Simply install library using npm/yarn
use import {launchCamera, launchImageLibrary} from 'react-native-image-picker'
getting error on launchCamera();
[TypeError: null is not an object (evaluating 'nativeImagePicler.launchCamera')]
getting error on launchImageLibrary();
[TypeError: null is not an object (evaluating 'nativeImagePicler.launchImageLibrary')]
Additional Information
- Image Picker version: 5.1.0
- React Native version: 0.64.2
- Platform: Android
- Development Operating System: MacOS
- Dev tools: Android Studio
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 16
Version 5.3.1 of react-native-image-picker uses TurboModules (TurboModuleRegistry). You need to upgrade React Native to 0.68.2 or downgrade react-native-image-picker to 4.0.0
Version 5.0.2 works for me
@k-angama Thank you! Downgrading to version 4.0.6 fixed it for me.
For android api level 33 new behavior
I need to upgrade 2 dependencies
Check if the api level version is 33 or grater, then request
else (is lower than 33)
Is this just a typo? It says Picler instead of Picker.
Edit: it is a typo but itβs just a variable name, so not the problem.