Xcode 4 加载项目后不显示任何文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5996966/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 4 shows no files after loading project
提问by Ben Collins
I've loaded a project in Xcode 4 after not looking at it for a while. Xcode shows its progress bar and indicates in text that the project is loading, and it appears to finish, but then there are no files shown in the hierarchy or flat views. There is nothing showing in any view (except for one breakpoint in the breakpoints view).
我在 Xcode 4 中加载了一个项目,一段时间没有看它。Xcode 显示其进度条并在文本中指示项目正在加载,它似乎已完成,但在层次结构或平面视图中没有显示任何文件。任何视图中都没有显示任何内容(断点视图中的一个断点除外)。
Any ideas? Xcode gives me zero indication that anything is wrong, it shows me nothing.
有任何想法吗?Xcode 给我零指示,表明有任何问题,它没有显示任何内容。
回答by charles
I just had the same issue. After a few hours scratching my head and trying all kind of things, I finally found a fix: remove the whole package 'project.xcworkspace' inside the XXXXX.xcodeproj package.
我只是有同样的问题。经过几个小时的摸索和各种尝试,我终于找到了解决方法:删除 XXXXX.xcodeproj 包中的整个包“project.xcworkspace”。
More specifically, when you find the 'XXXXX.xcodeproj' file, right-click it, and select 'Show Package Contents'. This will get you inside the package where you will find the 'package.xcworkspace' file. It is best to do this while the Xcode project is closed.
更具体地说,当您找到“XXXXX.xcodeproj”文件时,右键单击它,然后选择“显示包内容”。这将使您进入包中,您将在其中找到“package.xcworkspace”文件。最好在 Xcode 项目关闭时执行此操作。
Maybe that will work for you or for others with the same issue in the future...
也许这对你或将来有同样问题的其他人有用......
回答by FranticRock
Some of the project views have the "Recently Changed" filter icon. For me the problem was: i had that enabled in the Project Navigator, so it was only showing the files i recently changed. It looks like this. I'm using Xcode 6.1 though.
某些项目视图具有“最近更改”过滤器图标。对我来说问题是:我在项目导航器中启用了它,所以它只显示我最近更改的文件。看起来像这样。 不过我使用的是 Xcode 6.1。
回答by ViggoV
I had a similar issue. After archiving a project the files would disappear from the project navigator.
我有一个类似的问题。归档项目后,文件将从项目导航器中消失。
It turned out that somehow XCode had added the word "main" to the searchbar below the project navigator so that almost all files where invisible. Quite frustrating.
结果是,XCode 不知何故在项目导航器下方的搜索栏中添加了“main”一词,因此几乎所有文件都看不见了。很令人沮丧。
It might be the same case for you..
对你来说可能是同样的情况..
回答by jdero
For those who make it here, I was opening a older version of a similar iOS project after upgrading to the latest XCode (6.2), and was seeing the symptoms labeled in this question (missing files, folders etc.)
对于那些在这里成功的人,我在升级到最新的 XCode (6.2) 后打开了一个类似 iOS 项目的旧版本,并且看到了这个问题中标记的症状(丢失文件、文件夹等)
My solution: at the bottom left of the screen, unselecting 'Show only files with source-control status" which happened to be set on (it's blue when on). The icon looks like a 4-pt star inside a square.
我的解决方案:在屏幕的左下角,取消选择“仅显示具有源代码控制状态的文件”,它碰巧设置为打开(打开时为蓝色)。图标看起来像正方形内的 4 磅星。
回答by sundeep
remove the whole package 'project.xcworkspace' inside the XXXXX.xcodeproj package. may cause to any other error so please ignore and trying finally You can quit xcode and reload again your project it help you
删除 XXXXX.xcodeproj 包中的整个包“project.xcworkspace”。可能会导致任何其他错误,所以请忽略并最终尝试您可以退出 xcode 并重新加载您的项目,它可以帮助您
回答by sami
This happened to me when I tried to do an alt-tab, on a VM running in TeamViewer in Windows - Click the search bar below, enter delete multiple times and the invisible search term cleared up
当我尝试在 Windows 的 TeamViewer 中运行的 VM 上执行 alt-tab 时,发生了这种情况 - 单击下面的搜索栏,多次输入 delete 并清除不可见的搜索词
回答by TTT
I had the same issue. Besides the answers above, it could also be that you have already accidentally opened the project in another Xcode window... Close that and reopen everything and it should work.
我遇到过同样的问题。除了上面的答案,也可能是您已经不小心在另一个 Xcode 窗口中打开了项目......关闭并重新打开所有内容,它应该可以工作。