Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

undefined is not an object(evaluating 'ImagePickerManager.showImagePicker')

I am trying to use react-native-image-picker, but stuck here, it always shows the error as on the below photo:

undefined is not an object(evaluating 'ImagePickerManager.showImagePicker')

Is there anyone who had this problem?

enter image description here

like image 455
Sookie Avatar asked Oct 13 '16 10:10

Sookie


2 Answers

I had met it too. After a few hours, I find a solution to it.

Install $npm install react-native-image-picker@latest --save Automatic Installation React Native >= 0.29 $react-native link React Native < 0.29 $rnpm link

https://github.com/marcshilling/react-native-image-picker/blob/master/README.md This document is not up-to-date.

Using the above command, you can get the latest one. Then you can follow the README.md to use it. That is my way to solve it.

Good Luck!

like image 88
sai Avatar answered Oct 11 '22 13:10

sai


This message is basically saying that the native side of your app is not fully linked with the library.

Be sure to add:

  • iOS : libRNImagePicker.a to your app (XCode => Build phases => Link Binary with Libraries => +, then select the right file)
  • Android : compile project(':react-native-image-picker') to your build.gradle file
like image 44
Antoine Auffray Avatar answered Oct 11 '22 13:10

Antoine Auffray