Xcode Project Navigator,无法访问项目

时间:2019-03-29 17:20:04

标签: xcode

我为此苦苦挣扎。而且我知道答案正盯着我的脸,但是无论我进行什么搜索或查找并尝试,都无济于事。

enter image description here

我的方案都指向我的pod框架,即使我尝试添加新方案或编辑旧方案,也无法选择项目目标。

enter image description here

我的项目导航器从上面显示的文件夹开始,并且我不知道如何还原到我为获得它所做的一切。

如果有人有任何建议,请帮助。

我无法访问目标构建设置或项目构建设置,是否可以通过项目导航器访问它们?

我无法如方案所示正确构建,对此有简单的解决方法吗?我是否以某种方式将目标路径更改为错误的文件位置?如何还原? 我被困住了:(

更新:

删除.xcworkspace文件并重新安装Podfile会显示以下错误代码。

```
RuntimeError - [Xcodeproj] Unknown object version.
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/xcodeproj-1.5.8/lib/xcodeproj/project.rb:218:in `initialize_from_file'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/xcodeproj-1.5.8/lib/xcodeproj/project.rb:103:in `open'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer/analyzer.rb:918:in `block (2 levels) in inspect_targets_to_integrate'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer/analyzer.rb:917:in `each'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer/analyzer.rb:917:in `block in inspect_targets_to_integrate'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/user_interface.rb:64:in `section'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer/analyzer.rb:912:in `inspect_targets_to_integrate'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer/analyzer.rb:78:in `analyze'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:243:in `analyze'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/user_interface.rb:64:in `section'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:116:in `install!'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/command/install.rb:41:in `run'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/lib/cocoapods/command.rb:52:in `run'
/Applications/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.2/bin/pod:55:in `<top (required)>'
/Applications/CocoaPods.app/Contents/Resources/bundle/bin/pod:22:in `load'
/Applications/CocoaPods.app/Contents/Resources/bundle/bin/pod:22:in `<main>'
```

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
 - RuntimeError - [Xcodeproj] Unknown object version.
   https://github.com/CocoaPods/CocoaPods/issues/6992 [closed] [16 comments]
   31 Jan 2019

 - - ERROR | [iOS] unknown: Encountered an unknown error (Malformed version number string ) during validation.
   https://github.com/CocoaPods/CocoaPods/issues/8240 [closed] [16 comments]
   12 hours ago

 - Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa
   https://github.com/CocoaPods/CocoaPods/issues/7835 [closed] [46 comments]
   2 hours ago

and 44 more at:
https://github.com/cocoapods/cocoapods/search?q=%5BXcodeproj%5D%20Unknown%20object%20version.&type=Issues&ut

1 个答案:

答案 0 :(得分:0)

解决方案: 对于我特别特定的问题,我在所有MAC设备上默认安装的RUBYGEMS都有权限问题。 由于我没有“写权限”,因此无法将项目重新设置为原始状态。我必须安装homebrew和rbenv,这允许我(在将cocoapods完全从项目中删除之后)将项目重新设置为原始状态,然后再执行将文件目标重新设置为其他操作的操作。

在安装Homebrew和Rbenv之后,我安装了较新版本的RubyGem,该版本为我提供了新安装的管理员权限。然后,我将cocoapods重新安装到项目和VOILA。问题解决了。