在我的react本机项目中,我有这个依赖项"react native的增强";并像这样安装:
pod 'boost-for-react-native', :podspec => 'https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec'
它最近运行得很好。我不确定发生了什么变化,但我现在无法安装pod。当我运行pod安装时,我收到了这个错误
[!] CocoaPods could not find compatible versions for pod "boost-for-react-native":
In Podfile:
Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) was resolved to 2018.10.22.00, which depends on
boost-for-react-native
React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) was resolved to 0.61.5, which depends on
boost-for-react-native (= 1.63.0)
boost-for-react-native (from `https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec`)
我试过删除node_modules,删除podfile.lock,去集成pod。我还尝试将podfile和应用程序目标中的部署版本升级到11.0。但我还是犯了上述错误。
我将非常感谢在这方面的任何帮助。感谢
这可能是因为pod缓存。
试试这个:
- 删除可可豆缓存:
rm -rf ~/Library/Caches/CocoaPods
- 删除通常位于中的
Pods
文件夹和Podfile.lock
<project_root>/ios
- 重新安装吊舱:
pod update
我找到了一个临时解决方案或破解:(
由于错误指示react native的boost版本不兼容,podspec文件的链接的版本为1.63.0-1。
https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec
但预期版本为1.63.0
为了解决这个问题,我分叉了存储库,并将版本编辑为1.63.0。然后安装了吊舱,它就工作了。
我当前的react本机版本是0.60.5
我将我的podspec更改为:
https://raw.githubusercontent.com/react-native-community/boost-for-react-native/update-ios-platform-version/boost-for-react-native.podspec
并且奏效了。
方法是下载文件,然后从本地文件系统中获取,而不是进行网络调用:
从下载tar.bz2文件https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2
将(压缩的(文件移动到:
node_modules/react本机/第三方podspecies
open:node_modules/areact native/第三方podspecs/boost.podspec
将spec.source密钥的:http部分更改为::http=>'文件:'+dir+'/brust_1_76_0.tar.bz2'
运行吊舱安装
注意:您可能需要调整项目指定的boost包的版本。
用于解决方法。你不需要下载tar.bz2。然后转到node_modules/areact native/第三方podspecies。
仅更改线路
spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
:sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' }
至
spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2',
:sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' }
在文件node_modules/areact native/第三方podspecs/boost.podspec 中
我认为jfrog关闭了他们的服务器。如果您使用其他版本的,您可能需要更改76