gpt4 book ai didi

swift - xcodeproj 1.3.1 出现 Cocoapods 错误

转载 作者:行者123 更新时间:2023-11-30 13:02:11 25 4
gpt4 key购买 nike

我更新到了 Xcode 8 和 Mac OS Sierra,同时更新了 Cocoapods 和我正在使用的 pod。

我用“sudo gem update cocoapods”更新了 cocoapods,它做到了这一点(这很好,并且符合预期):

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

但是运行“pod install”后,它给了我以下错误。

不确定发生了什么...请帮忙!

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

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>'

――――模板结束―――――――――――――――――――――――――――――――――――――――――― ――――――――――――――――――――――

[!]哦不,发生错误。

最佳答案

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

我将这些行添加到 Podfile 的末尾:

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 的帮助下)

关于swift - xcodeproj 1.3.1 出现 Cocoapods 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39800894/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com