React native null不是react native中Cameraroll中的对象(计算';"nativeInterface.default.getPhotos';)
使用react native community中的摄影机卷库并正确命名导入。 下面是使用expo目录初始化项目的代码React native null不是react native中Cameraroll中的对象(计算';"nativeInterface.default.getPhotos';),react-native,react-redux,react-native-navigation,react-native-camera,react-native-community-netinfo,React Native,React Redux,React Native Navigation,React Native Camera,React Native Community Netinfo,使用react native community中的摄影机卷库并正确命名导入。 下面是使用expo目录初始化项目的代码 import { ActionSheetIOS, ListView, StyleSheet, Text, TouchableOpacity, View, Platform} from 'react-native'; import { Navigator } from 'react-native-deprecated-custom-components'; import Phot
import { ActionSheetIOS, ListView, StyleSheet, Text, TouchableOpacity, View, Platform} from 'react-native';
import { Navigator } from 'react-native-deprecated-custom-components';
import PhotoBrowser from 'react-native-photo-browser';
import CameraRoll from "@react-native-community/cameraroll";
const Photos= [
{
title: 'A',
description: 'Photo to display',
enableGrid: false,
media: [{
photo: 'A',
title: 'A',
}],
}
];
CameraRoll.getPhotos({
first: 30,
assetType: 'Photos',
}).then((data) => {
const media = [];
data.edges.forEach(d => media.push({
photo: d.node.image.uri,
}));
Photos[2].media = media;
}).catch();
请建议解决上述问题,感谢您为我手动链接模块完成了这项工作
react native link@react native community/cameraroll
您有没有找到解决方案?