在安装了CocoaPods的RestKit之后,出现错误“The sandbox is not in sync with the Podfile.lock”怎么办?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (30)

使用cocopods安装RestKit后遇到了一个奇怪的问题。

用cocopods解析我的项目的RestKit依赖项并尝试构建它之后,出现错误:

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

一些截图:

  PODS:
  - AFNetworking (1.3.3)
  - RestKit (0.20.3):
    - RestKit/Core
  - RestKit/Core (0.20.3):
    - RestKit/CoreData
    - RestKit/Network
    - RestKit/ObjectMapping
  - RestKit/CoreData (0.20.3)
  - RestKit/Network (0.20.3):
    - AFNetworking (~> 1.3.0)
    - RestKit/ObjectMapping
    - RestKit/Support
    - SOCKit
  - RestKit/ObjectMapping (0.20.3)
  - RestKit/Search (0.20.3):
    - RestKit/CoreData
  - RestKit/Support (0.20.3):
    - TransitionKit (= 1.1.1)
  - RestKit/Testing (0.20.3)
  - SOCKit (1.1)
  - TransitionKit (1.1.1)

DEPENDENCIES:
  - RestKit (~> 0.20.0)
  - RestKit/Search (~> 0.20.0)
  - RestKit/Testing (~> 0.20.0)

SPEC CHECKSUMS:
  AFNetworking: 61fdd49e2ffe6380378df37b3b6e70630bb9dd66
  RestKit: 1f181c180105a92f11ec4f6cd7de37625e516d83
  SOCKit: 2f3bc4d07910de12dcc202815e07db68a3802581
  TransitionKit: d0e3344aac92991395d4c2e72d9c5a8ceeb12910

COCOAPODS: 0.29.0
提问于
用户回答回答于

更新CocoaPods。

删除原来的:

  1. 在项目导航器中,选择项目。
  2. 选择你的目标
  3. 删除所有Build Phases > Link Binary With Libraries的libPods*.a文件

更新:

  1. 启动终端并进入项目目录。
  2. 使用pod install命令更新CocoaPods
用户回答回答于

经过多次尝试后,我设法解决了这个问题。

进入Build Phases -> Check Pods Manifest.lock替换

diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null

diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null

扫码关注云+社区