使用 React Image Picker 我面临这个错误:TypeError: undefined is not an object (evaluating '_reactNativeImagePicker.default.showImagePicker')
当我单击图像选择器功能时会发生这种情况
手机截图:

这是我的代码:
import React from 'react';
import { View, Text,Button } from 'react-native';
import ImagePicker from 'react-native-image-picker';
const options = {
title: 'Select Avatar',
customButtons: [{ name: 'fb', title: 'Choose Photo from Facebook' }],
storageOptions: {
skipBackup: true,
path: 'images',
},
};
function Picker(){
const openPicker =()=>{
ImagePicker.showImagePicker(options, (response) => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) { …Run Code Online (Sandbox Code Playgroud) 使用 npx react-native run-android 命令安装 React Native 图像选择器后,我遇到了这个问题。
D:\WEB SAYLANI\React Native CLI\AwesomeProject>npx react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 1222 file(s) to forward-jetify. Using 4 workers... info JS server already running. info Installing the app...
Task :app:processDebugManifest FAILED
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual …