我正在使用React Native为Android和ios开发移动应用程序。我在Windows机器上开发了应用程序,并成功运行。我有很多模块,一切都在Android上运行得很好。
现在,我正在尝试在macOS上安装所有模块。我运行了npm install,然后尝试运行npx pod-install,但得到了这个错误:[!] Unable to find a specification for UMFileSystemInterface depended upon by EXAV。
我认为这个问题可能是由于react-native-unimodules造成的,我按照文档中的说明在ios上安装了这个模块,但这并没有帮助。你知道怎么解决这个问题吗?
这是我的Podfile
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require File.join(`node --print "require.resolve('react-native/package.json')"`, "../scripts/react_native_pods")
require File.join(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`, "../native_modules")
require File.join(`node --print "require.resolve('react-native-unimodules/package.json')"`, "../cocoapods")
platform :ios, '13.6'
target 'Capitalba' do
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
use_unimodules!
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
# Uncomment to opt-in to using Flipper
#
# if !ENV['CI']
# use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
# post_install do |installer|
# flipper_post_install(installer)
# end
# end
end发布于 2021-09-24 22:44:35
为了解决这个问题,我卸载了expo-av包
yarn remove expo-av -这将刷新锁定文件
然后重新安装软件包:
yarn add expo-av
并运行了cd ios/ && rm -rf Pods && pod install --repo-update以确保我们得到最新的版本。
在此之前,我对react-native-unimodules包做了同样的处理,但我不相信它是相关的。
https://stackoverflow.com/questions/68823349
复制相似问题