在用cocoapods安装RestKit之后,我遇到了一个奇怪的问题。 在用cocoapods解决我的项目的RestKit依赖关系并试图构建它之后,我面临这个错误:

沙箱与Podfile.lock不同步。运行“pod install”或更新CocoaPods安装。

我试着运行pod安装,但没有变化。

以下是一些照片:

  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

当前回答

我不小心删除,然后解包回文件夹从我试图安装豆荚。 是这样的: 1) CD在你的项目文件夹 2)压缩你的项目 3)删除项目文件夹 4)解压文件夹回来 5)从现在开始,即使你有这个文件夹,你也应该从终端再次进入这个文件夹

其他回答

pod deintegrate <PROJECT>.XCODEPROJ // will deintegrate cocoapods
pod install // installs the pods

检查吊舱目标和跑者目标必须一致

1 -跑步

2 -吊舱

对我来说,这是Ruby版本号的问题。

我得到了错误:

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

在尝试了一百万件事情之后,包括这个线程中包含的大部分内容,我最终破解了位于:usr/local/bin/pod的pod文件

我更正了第一行,以指向我的机器上实际存在的ruby版本。我改变了:

#!/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby

to

#!/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby

经过几天的努力,从3级到6级一切都解决了。

确保pod配置文件已设置。

我有这个问题时,我试图删除以前安装的库

@Michal的回答帮助了我

删除或卸载之前添加的库:cocoapods