解决cocoapods diff: /../Podfile.lock: No such file or directory

最近把以前代码放到新电脑上运行,在执行pod update之后build工程遇到如下提示:

  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.

google一圈之后,找到两个解决方案:

  • 方案一:

    关闭Xcode,重新执行pod install,之后再重新打开Xcode运行。

  • 方案二:

    稍微复杂一点,删除以下文件:

    xcworkspace

    Podfile.lock

    Pods文件夹

    ~/Library/Developer/Xcode/DerivedData路径下对应工程的文件夹

    然后重新执行pod install

如果以上两个方案对你有用的话,恭喜你,下面的可以不用看了,如果你像我一样倒霉,仍然运行不起来的话,来来来,咱们继续。

  • 方案三
    1. 设置Configurations

      选中Project->选择Info tab->看看Configurations是不是被设置为 None了,如果是None的话请改为Pods,如图:

      设置Configurations

    2. 修改Pods脚本文件路径
      1. 右键工程根目录下的xxx.xcodeproj文件,显示包内容
      2. 双击打开project.pbxproj文件
      3. 查找"Pods-resources.sh", 把路径改为如下红框处:

        修改Pods脚本文件路径

      4. 重新打开工程(双击workspace文件),到此应该是能正常编译运行了,如果还是不行,期待你提出方案四^_^

文/猴少(简书作者)

原文链接:http://www.jianshu.com/p/4c3164fe552a

著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

时间: 2024-10-23 03:07:32

解决cocoapods diff: /../Podfile.lock: No such file or directory的相关文章

下载的pod链接失效,build diff: /../Podfile.lock: No such file or directory解决办法

build diff: /../Podfile.lock: No such file or directory 1.终端进入文件路径,执行pod install 2.在工程设置中的Build Phases下删除Check Pods Manifest.lock及Copy Pods Resources 3.clean工程,然后编译就ok了 不行再试试下面方法: 工程使用CocoaPods管理第三方库,在新的目录update版本的时候出现如下问题 问题1描述: diff: /../Podfile.lo

如何解决diff: /../Podfile.lock: No such file or directory 的问题

之前碰到过此类问题,原因是之前用了测试版本的pod,然后回归正式版本,导致找不到pod文件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 install

cocoapods出现Diff: /../Podfile.lock: No such file or directory错误

第一种解决方法: 关闭Xcode,重新执行pod install,之后再重新打开Xcode运行. 第二种解决方法: 删除以下文件: xcworkspacePodfile.lockPods文件夹~/Library/Developer/Xcode/DerivedData路径下对应工程的文件夹 然后重新执行pod install 第三种解决方法: 设置Configurations 选中Project->选择Info tab->看看Configurations是不是被设置为 None了,如果是None

【iOS】build diff: /../Podfile.lock: No such file or directory

Github 上下载的开源项目,在 Xcode 打开运行后报了错,如图所示: 解决方法: 在工程设置中的 Build Phases 下删除 Check Pods Manifest.lock 及 Copy Pods Resources. 参考:http://www.ziliao1.com/Article/Show/9FE22F6D957291CC517BDC9B2509871F.html

解决 diff: /../Podfile.lock: No such file or directo

工程使用CocoaPods管理第三方库,在新的目录update版本的时候出现如下问题 问题1描述: 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 in

iOS "The sandbox is not in sync with the Podfile.lock"解决方式

更新Cocoapod之后出现故障: 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.` 解决方式: 关闭如今的工作空间,删掉曾经

解决 The sandbox is not sync with the Podfile.lock问题时候,如下所示

问题描述: github  / sourcetree下载的Demo,很多时候使用到CocoaPods,有的时候因为依赖关系或者版本问题不能编译运行.出现例如The sandbox is not sync with the Podfile.lock问题时候,如下所示 diff: /../Podfile.lock: No such file or directory diff: Manifest.lock: No such file or directory error: The sandbox i

GitHub 上下载代码运行报错 :'The sandbox is not sync with the Podfile.lock\'

问题描述: github下载的Demo,很多时候使用到CocoaPods,有的时候因为依赖关系或者版本问题不能编译运行.出现例如The sandbox is not sync with the Podfile.lock问题时候,如下所示 diff: /../Podfile.lock: No such file or directory diff: Manifest.lock: No such file or directory error: The sandbox is not in sync

关于iOS 'The sandbox is not sync with the Podfile.lock'问题解决方法

问题描述: github下载的Demo,很多时候使用到CocoaPods,有的时候因为依赖关系或者版本问题不能编译运行.出现例如The sandbox is not sync with the Podfile.lock问题时候,如下所示 diff: /../Podfile.lock: No such file or directory diff: Manifest.lock: No such file or directory error: The sandbox is not in sync