iOS Bug---Github上下载项目cocoapods报错 diff: /../Podfile.lock No such file or directory

错误描述:
Github上下载的项目cocoapods出现错误,左边目录Pods.xcodeproj文件变红,运行后显示以下错误:
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

如图:

解决方法:

需要我们重新pod里面的第三方:
1.删除项目中的原有Podfile.lock文件



Paste_Image.png

2.对这个项目重新pod install:
打开终端命令行:


Paste_Image.png

在命令行内输入 cd ,然后空格,再输入整个项目的路径(将整个项目的文件用鼠标直接拖拽进终端的黑色窗口内即可)按回车。(这个过程就是让命令行接下来的操作都是针对这个项目文件进行操作)


Paste_Image.png

再输入$ pod install (最好用命令 $ pod install --no-repo-update),等待项目pod install,出现p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}span.s1 {font-variant-ligatures: no-common-ligatures}

Pod installation complete! There are 4 dependencies from the Podfile and 5 total
pods installed.即可,关闭窗口重新运行项目。


Paste_Image.png

如果执行$ pod install 报错  -bash: pod: command not found 请参考下面文章

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值