ImagePicker.showImagePicker 不是函数
ImagePicker.showImagePicker is not a function
我正在尝试使用 ImagePicker.showImagePicker,但出现异常:
ImagePicker.showImagePicker is not a function
我的代码看起来像
ImagePicker.showImagePicker(options, response => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) {
console.log('ImagePicker Error: ', response.error);
} else if (response.customButton) {
图像选择器从 2.x.x 迁移到 3.x.x 从 API 中删除了 showImagePicker。
使用 launchCamera 或 launchImageLibrary
见https://github.com/react-native-image-picker/react-native-image-picker
我正在尝试使用 ImagePicker.showImagePicker,但出现异常:
ImagePicker.showImagePicker is not a function
我的代码看起来像
ImagePicker.showImagePicker(options, response => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) {
console.log('ImagePicker Error: ', response.error);
} else if (response.customButton) {
图像选择器从 2.x.x 迁移到 3.x.x 从 API 中删除了 showImagePicker。 使用 launchCamera 或 launchImageLibrary
见https://github.com/react-native-image-picker/react-native-image-picker