7

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

ArK
  • 20,698
  • 67
  • 109
  • 136
Sookie
  • 71
  • 1
  • 4

2 Answers2

3

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!

sai
  • 31
  • 3
3

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
Antoine Auffray
  • 1,283
  • 1
  • 17
  • 33
  • I am unable to find `libRNImagePIcker.a` among to options. Do I have to download it from somewhere? – Ren Jan 23 '19 at 14:31