首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用xcodeproj 1.3.1的Cocoapods错误

使用xcodeproj 1.3.1的Cocoapods错误
EN

Stack Overflow用户
提问于 2016-09-30 22:21:37
回答 1查看 737关注 0票数 0

我更新了Xcode 8和MacOS塞拉利昂,同时也更新了Cocoapods和我正在使用的豆荚。

我用"sudo宝石更新cocoapods“更新cocoapods,它做到了这一点(这很好,也是预期的):

代码语言:javascript
复制
Updating installed gems
Updating cocoapods
Fetching: cocoapods-core-1.0.1.gem (100%)
Successfully installed cocoapods-core-1.0.1
Fetching: xcodeproj-1.3.1.gem (100%)
Successfully installed xcodeproj-1.3.1
Fetching: cocoapods-1.0.1.gem (100%)
Successfully installed cocoapods-1.0.1
Fetching: concurrent-ruby-1.0.2.gem (100%)
Successfully installed concurrent-ruby-1.0.2
Parsing documentation for cocoapods-core-1.0.1

但是在运行“吊舱安装”之后,它给了我下面的错误。

不知道发生了什么..。请帮帮我!

这也导致Xcode给了我这个错误:

代码语言:javascript
复制
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.

以下是Cocoapods错误:

错误

RuntimeError - [Xcodeproj] Consistency issue: no parent for object `Main Group`: `` /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/helpers/groupable_helper.rb:18:in `parent' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/helpers/groupable_helper.rb:118:in `source_tree_real_path' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/helpers/groupable_helper.rb:100:in `real_path' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/helpers/groupable_helper.rb:121:in `source_tree_real_path' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/helpers/groupable_helper.rb:100:in `real_path' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/helpers/groupable_helper.rb:121:in `source_tree_real_path' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/helpers/groupable_helper.rb:100:in `real_path' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.3.1/lib/xcodeproj/project/object/file_reference.rb:163:in `real_path' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:49:in `block (2 levels) in update_to_cocoapods_0_34' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:46:in `select' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:46:in `block in update_to_cocoapods_0_34' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:45:in `each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:45:in `update_to_cocoapods_0_34' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:21:in `block (2 levels) in integrate' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:20:in `each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:20:in `block in integrate' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:19:in `each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb:19:in `integrate' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator.rb:58:in `block in integrate!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator/target_integrator.rb:57:in `integrate!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator.rb:129:in `each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator.rb:129:in `integrate_user_targets' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/user_project_integrator.rb:63:in `integrate!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:610:in `block in integrate_user_project' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:607:in `integrate_user_project' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:117:in `install!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/command/install.rb:37:in `run' /Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/command.rb:50:in `run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>'

--模板端――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

好了!哦,不,发生了一个错误。

EN

回答 1

Stack Overflow用户

发布于 2016-09-30 23:18:52

看来我找到了解决办法。我使用了Cocoapods应用程序(https://cocoapods.org/app)

我在我的Podfile末尾添加了这些行:

代码语言:javascript
复制
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end

(借助Xcode 8 Beta 3 Use Legacy Swift issue的帮助)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39800894

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档