Xcode 4.2 (Snow Leopard) 构建警告“丢失文件”

发布于 2024-12-23 18:03:11 字数 102 浏览 0 评论 0原文

我最近从我的项目中删除了一个视图控制器(.h 和 .m 文件),但我知道每次构建时都会收到“丢失文件”警告。

对此有什么想法吗?这是我需要担心的事情吗?

赞赏

I recently deleted a viewcontroller from my project (both .h and .m files) but know I get a 'missing file' warning every time I build.

Any ideas on this and is it something I need to worry about?

Appreciated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

物价感观 2024-12-30 18:03:11

如果您使用 svn 或 git,这可能是版本控制问题。我遇到了这个问题并使用本文中提供的解决方案解决了它:

升级到 XCode 4 后出现丢失文件警告

This is probably a version control issue if you are using svn or git. I had this problem and solved it using the solution provided in this post:

Missing file warnings showing up after upgrade to XCode 4

拒绝两难 2024-12-30 18:03:11

我最近遇到了同样的情况。添加和删​​除对我来说不起作用。
但是,我再次添加它们并右键单击它们。在源代码控制下,我放弃了更改,然后删除了文件(移至垃圾箱)。这对我有用!

I recently faced the same scenario. Adding and deleting did not work for me.
However, I added them once more and right clicked on them. Under source control, I Discarded the changes and then deleted the files(Move to trash). This worked for me !!!

听你说爱我 2024-12-30 18:03:11

确保项目中的任何地方都没有引用它。

  • 查看左侧栏上的文件,确保它不在那里。丢失的文件显示为红色。
  • 确保您的文件中没有#import 文件。

另外,将来请避免将文件存储在父目录中。 ../../ 不是您想要使用的内容。

Ensure that it's not referenced anywhere in the project.

  • Look at the files on the bar on the left, make sure it's not there. Missing files are colored in red.
  • Ensure that none of your files #import the file.

Also, in the future, avoid storing files in parent directories. ../../ isn't something you want to use.

金橙橙 2024-12-30 18:03:11

您的目标的要编译或复制的文件列表中可能有一个“悬空引用”——检查您的编译和复制阶段以查找发出警告的目标。

如果它已被物理删除,最简单的方法通常是在项目导航器的搜索字段中输入文件名 - 查找 Tom 详细说明的内容 - 然后从项目中删除文件。

You likely have a 'dangling reference' in your target's list of files to compile or copy -- check your compile and copy phases for the target which emits the warning.

If it's been physically deleted, the simplest way is usually to enter the file name into the project navigator's search field - look for what Tom detailed - then delete the files from the project(s).

最舍不得你 2024-12-30 18:03:11

我有一个类似的问题。我试图删除 .h 和 .m,并且想完全删除这些文件,但如果我选择“移至垃圾箱”而不是“删除引用”,则会不断出现错误。

事实证明,我只需要单独删除每个文件。只需重新添加文件(如果您在某处有它们)并一次重新删除它们即可。为我工作!

I had a similiar problem. I was trying to delete a .h and .m and I wanted to remove the files entirely, but kept getting errors if I chose "Move to Trash" instead of just "Remove Reference".

Turns out, I needed to just delete each file INDIVIDUALLY. Just add the files back in (if you have them somewhere) and re-delete them one at a time. Worked for me!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文