为什么 Xcode 4 版本编辑器有时会显示“没有编辑器”?
在项目导航器中,项目文件旁边有一个小“M”,表示它已被修改。 所以我点击版本编辑器。左侧显示了项目文件的内容,右侧显示“无编辑器”。如果我进入源代码管理,提交选定的文件,也会发生同样的事情...
但是,其他文件(.m、.h、.plist 等)都显示出真正的差异,并正确签入更改。
我是否以某种方式配置错误?
In the Project Navigator, there is a little "M" next to the project file, meaning it's been modified.
So I tap the Version Editor. The left side shows me the contents of the project file, and the right side says "No Editor". Same thing if I go into Source Control, Commit Selected Files...
However, other files (.m, .h, .plist, etc.) all show real differences, and correctly check-in changes.
Do I have this mis-configured somehow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
在我更新到 Xcode 4.0.2 之前,这发生在我身上。我认为这是一个错误。但是,请尝试通过转到“文件”->“刷新状态”。源代码控制 ->刷新状态。
另外,这可能是显而易见的,但请确保您通过在源树中单击来实际选择修改后的文件。
This happened to me before I updated to Xcode 4.0.2. I think it's a bug. However, try to refresh status by going to
File -> Source Control -> Refresh Status
.Also, may be obvious, but make sure you actually select the modified file by clicking it in the source tree.
我也有这个,完全相同的问题。
尽管事实上您可以使用管理器界面或命令行界面,并且它们看起来都很好。
在通过 Xcode File...Source Control..commit 更新文件之前,它无法识别该文件,并且版本编辑器似乎无法工作。
症状:右窗格将显示“已添加文件”和“未版本化文件”等消息,而左窗格将仅显示当前本地修订版。
这特别奇怪,因为跳转栏和时间线将显示其他修订,但你无法访问它们。
解决方法是对每个文件进行少量编辑,然后使用 Xcode 的 File..Source Control..Commit。
然后文件(及其之前的修订版)将开始显示在版本编辑器中。
I had this too, exact same problem.
This is despite the fact that you can be using either the organizer interface, or the command line interface, and they appear fine.
Until a file has been updated through the Xcode File...Source Control..commit it doesn't recognize the file, and the version editor will appear to not be working.
Symptom :The Right pane will show messages like File Added and Unversioned File, and the left pane will only ever show the current local Revision.
This is particularly odd because the jump bars and timeline will show the other revisions, you just can't get to them.
The Workaround is to make a small edit to each file then use Xcode's File..Source Control..Commit.
Then the files (and their prior revisions) will start showing up in the version editor.
使用 SVN 存储库时也遇到同样的问题。当我进入组织者并确认我可以看到我正在工作的分支的修订历史记录后,这个问题就得到了解决。我不得不点击刷新。
Had same problem as well using an SVN repository. It was resolved once I went into the organizer and verified that I could see the revision history of the branch I was working on. I had to hit refresh.
我在存储、更改分支然后使用 git/sourcetree 取消存储后遇到了这个问题。
上述方法均无效,但删除工作区却有效。
根据此链接。
Xcode 4 - 性能缓慢
这是在 Xcode 4.5 上
I had this issue after stashing , changing branch and then unstashing using git/sourcetree.
None of the above worked, but deleting the workspace did.
As per this link.
Xcode 4 - slow performance
The was on Xcode 4.5
我在 XCode 4.4.1 中遇到了同样的问题
我的解决方案:
虽然他在版本控制视图上显示“无编辑器”,但顶部栏显示“正在加载修订版”并且有一个无限进度栏。
我只需双击进度栏,文件就会加载到编辑器上。
I had the same problem with XCode 4.4.1
My Solution:
While he showed No Editor on the Version Control View, the top bar was saying "Loading Revision" and had a infinite progression bar.
I just double clicked the progression bar and the files were loaded on the editor.
可以设置本地 git 作为源代码控制,这将使您的文件>源代码控制>提交工作。
我认为这将在某种程度上回答您的特定问题。
警告,要拉取以前的版本,您需要退出 XCode(为了安全)并使用 CLI git。
请参阅此内容以获取有关此主题的出色帮助。
Xcode 4 git 集成
It is possible to set up a local git to act as a source control, This will make your file>Source Control>Commit work.
I think this will go some way to answering your particular problem.
Warning, to pull previous versions you need to come out of XCode (for safety) and use the CLI git.
See this for excellent help on this topic.
Xcode 4 git integration
(颠覆单片机)
在组织者存储库窗格中执行更新操作可以重新同步 Xcode 并解决问题。无需承诺。
(subversion SCM)
Doing an update action in the organizer Repositories pane does resync Xcode and sort out the problem. No need to commit.
当我尝试通过简单地选择文件夹并在 Finder 中选择“文件”>“复制”来复制项目以进行一些实验时,我遇到了“无编辑器”问题。 Xcode 不喜欢这样,不仅重复的项目给出了“无编辑器”问题,而且(在删除重复的项目之后)我发现每当我尝试打开原始项目时,它都会给出“无编辑器”问题。
我的解决方案是简单地使用 Time Capsule 将项目文件夹恢复到我造成所有这些问题之前的状态。成功了!
不过,我仍然有点困惑为什么它会起作用,因为 Finder 表明原始项目文件没有因我所做的任何事情而被修改。也许有一些不可见的文件或已更改的内容......
I ran into this "No Editor" problem when I tried to duplicate a project to do some experimentation on by simply selecting the folder and selecting File>Duplicate in the Finder. Xcode didn't like this, and not only did the duplicated project give a "No Editor" problem, but (after erasing the duplicated project) I found that the original project gave a "No Editor" problem whenever I tried to open it.
My solution was to simply use Time Capsule to restore the project folder to before I caused all of these problems. It worked!
I'm still a bit puzzled about why it worked, though, because the Finder indicated that none of the original project files had been modified as a result of anything I had done. Perhaps there were some invisible files or something that had been changed....
不知道,但对我来说,我可以通过从最近的文件中选择它来回到我的项目
No idea, but for me, I could get back into my project by choosing it from recent files
Xcode 7.2.1 也有同样的问题。我执行了“产品清理”,然后选择“源代码控制历史记录”,并通过选择“显示#修改的文件”选择历史提交之一,然后选择窗口左上角的列表图标(页面图标之后) 。现在一切正常。
Had the same issue with Xcode 7.2.1. I did a 'Product-Clean' and then chose 'Source Control-History' and one of the historic commits by selecting "Show # modified files" AND THEN chose the list icon in the upper left part of window (after the page icon). Now all works fine.
一旦我清除了派生数据,它就对我有用。
为此,请转到终端并输入: -
rm -rf ~/Library/Developer/Xcode/DerivedData
It worked for me once I cleared the derived data.
For that, go to the terminal and enter: -
rm -rf ~/Library/Developer/Xcode/DerivedData