ios 找不到 pod 的兼容版本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48638059/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
could not find compatible versions for pod
提问by Somoy Das Gupta
I am new in IOS development and git. I am having a problem after merging my local repo to the dev repo. After merging when I build the project I get an error in the Xcode that says, "The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation."
我是 IOS 开发和 git 的新手。将我的本地存储库合并到开发存储库后,我遇到了问题。在我构建项目时合并后,我在 Xcode 中收到一条错误消息:“沙箱与 Podfile.lock 不同步。运行‘pod install’或更新您的 CocoaPods 安装。”
I searched about this and tried the usual solution reinstalling the pods. But executing
我搜索了这个并尝试了重新安装豆荚的常用解决方案。但是执行
pod install
I get another error in terminal that says
我在终端中收到另一个错误,上面写着
At this point I tried deleting the files associated with the "FTPopOverMenu" pod and reinstalling with pod install. The error doesn't go away. Also, I tried solving it in this way - Error:“The sandbox is not in sync with the Podfile.lock…” after installing RestKit with cocoapods
此时,我尝试删除与“FTPopOverMenu”pod 关联的文件并使用pod install重新安装。错误不会消失。另外,我尝试以这种方式解决它 -错误:“The sandbox is not in sync with the Podfile.lock...” 用 cocoapods 安装 RestKit 后
But both error in the Xcode and in the terminal still remains. I'm new to IOS and Git. I really don't understand what is really happening here.
但是 Xcode 和终端中的错误仍然存在。我是 IOS 和 Git 的新手。我真的不明白这里到底发生了什么。
采纳答案by Ravi Panchal
As per my guess you are working on an old project means which is already developed in Xcode 8 series and now you are working with latest Xcode and you have updated the code accordingly.
根据我的猜测,您正在开发一个旧项目意味着它已经在 Xcode 8 系列中开发,现在您正在使用最新的 Xcode,并且您已经相应地更新了代码。
So just do the below steps:-
所以只需执行以下步骤:-
- "pod deintegrate"
- "pod install"
- "pod update" (if it is necessary so do it else if you have all latest pod so don't use it.)
- “吊舱解体”
- “吊舱安装”
- “pod update”(如果有必要,请执行此操作,否则如果您拥有所有最新的 pod,请不要使用它。)
It will remove all old cocoapods traces.
它将删除所有旧的 cocoapods 痕迹。
OR Alternate way to do it (Temp Work Around)
或替代方法(临时工作)
- Remove that cocoa pod temporary, after all your work finish add to your project and give a try cause in my case it is the only work around i have that worked.
- 暂时删除那个可可豆荚,在您完成所有工作后添加到您的项目中,并在我的情况下尝试原因,这是我唯一可行的解决方法。
回答by landonandrey
In my case pod repos were outdated, solved with pod repo update
在我的情况下,pod repos 已经过时,解决了 pod repo update
回答by Ankur Lahiry
if @Ravi Panchal's answer can't solve your problem, it may be your pod repo is out dated
如果@Ravi Panchal 的回答不能解决您的问题,则可能是您的 pod 存储库已过时
Solution:
解决方案:
pod install --repo-update
回答by Jerome Li
First, check your Podfile.lock and make sure no conflict with the spec constraints.
首先,检查您的 Podfile.lock 并确保与规范约束没有冲突。
I encounter this issue with strange pod dependency, and solve it by
我遇到了这个奇怪的 pod 依赖问题,并通过
1. remove Podfile.lock
1. remove Podfile.lock
2. pod install
again
2. pod install
再次
It just work like magic. I think it is a bug that cocoapods cannot solve this kind of constraints in Podfile.lock. Remove the old Podfile.lock can make it apply the new rule easily.
它就像魔术一样工作。我认为是cocoapods无法解决Podfile.lock中的这种约束的错误。删除旧的 Podfile.lock 可以使其轻松应用新规则。
回答by Himanth
I had the same issue with FIRMessaging
from cocoapods
. I solved the issue by doing like following steps
我对FIRMessaging
from有同样的问题cocoapods
。我通过执行以下步骤解决了这个问题
- Remove
FTPopOverMenu
from yourpodfile
which can find in your project folder. - Open terminal and run
pod install
. You can see in terminal thatFTPopOverMenu
will be removing from your pods. - Now, again open your
podfile
and write thispod 'FTPopOverMenu'
. Runpod install
in terminal.
FTPopOverMenu
从您podfile
可以在您的项目文件夹中找到的删除。- 打开终端并运行
pod install
。您可以在终端中看到FTPopOverMenu
将从您的 pod 中删除。 - 现在,再次打开你的
podfile
并写下这个pod 'FTPopOverMenu'
.pod install
在终端中运行。
The error will go away from terminal.
错误将从终端消失。