ios - React-native 相机胶卷链接问题
问题描述
我正在尝试将库添加到我的项目@react-native-community/cameraroll。但它没有得到链接,并且在 Xcode 中构建总是失败,甚至没有显示错误。
我的座右铭是使用 react-native 将图像保存到 iOS 和 android 中的 cameraroll
我正在使用 React-native 版本 0.60
解决方案
遵循以下步骤:
react-native unlink @react-native-community/cameraroll
npm uninstall @react-native-community/cameraroll
cd ios/ && pod install && cd ..
rm -rf node_modules
rm -rf package-lock.json
npm install
npm install @react-native-community/cameraroll --save
cd ios/ && pod install && cd ..
react-native run-ios
如果由于任何原因这不起作用,只需卸载 @react-native-community/cameraroll 库,然后尝试使用 react-native run-ios app 命令运行并检查是否有效,然后将以下内容添加到您的 package.json 文件中的依赖项:
"@react-native-community/cameraroll": "^1.2.1"
它为我工作。
推荐阅读
- swift - Firebase 将 URL 上传到实时数据库
- javascript - React - 使用 Object.keys.map 迭代时检查字符串中的空格
- python - 如何根据多个条件顺序评估Dataframe中的列
- processing - 根据鼠标位置移动图像留下轨迹和方向移动 - 处理
- assembly - 在 glibc 的 ld.so 中禁用 xsave
- python - Python 'while' 有两个条件:“and”或“or”
- firebase - 如何快速填充 Firestore 数据库?
- php - docker-compose php laravel - 会话不会保持不变
- c++ - c ++从'float'到'int32'的转换,可能丢失数据
- php - 根据总迭代次数更改我的 css 类中的宽度