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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jiaxin_1105/article/details/81012728
错误描述:
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 请参考下面文章

猜你喜欢

转载自blog.csdn.net/jiaxin_1105/article/details/81012728