Undefined is not an object (rating "ImagePickerManager.showImagePicker")

I'm trying to use change-native-pick-picker, but stuck here, it always shows an error, as in the photo below:

undefined is not an object (rating "ImagePickerManager.showImagePicker")

Does anyone have this problem?

enter image description here

+6
source share
3 answers

I also met this. After a few hours, I find a solution.

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

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

Using the command above, you can get the latest version. Then you can follow README.md to use it. This is my way to solve this problem.

Good luck

+2
source

This post basically says that the native side of your application is not completely connected with the library.

Be sure to add:

  • iOS: libRNImagePicker.a to your application ( XCode => Build phases => Link Binary with Libraries => +, then select the right file )
  • Android: compile project(':react-native-image-picker') in your build.gradle file
+1
source

Instead of writing

import { ImagePicker } from 'react-native-image-picker',

you need to state (ibid.) ...

var ImagePicker = require('react-native-image-picker');

It worked for me.

0
source

Source: https://habr.com/ru/post/1258135/


All Articles