ios 找不到 Xcode 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19447860/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 02:24:53  来源:igfitidea点击:

Xcode file not found

iosxcode

提问by jpd

I am facing an error of file not found.

我正面临找不到文件的错误。

I have added all necessary files, but it gives file not found for a file.

我已经添加了所有必要的文件,但它提供了找不到文件的文件。

#import "MagickWand.h"

for above file it gives error.

对于上述文件,它给出了错误。

#import "FrameSection.h"
#import "FreeCropIphone5.h"
#import "DoodleView.h"

Please help me.

请帮我。

回答by vsandeepraju

Clean the build folder by pressing ? + alt + ? + k. It may help you to rectify the error caused.

按 清理构建文件夹? + alt + ? + k。它可以帮助您纠正造成的错误。

There can be many cases that cause this error. This is one of the option to clear that error.

可能有很多情况会导致此错误。这是清除该错误的选项之一。

回答by Buntylm

NOTE

笔记

As According to this kind of problem the reason may be sometime due to cyclic import. means like you have a file with the name first.hand you importing second.hand in second.hyou importing first.hand you not including first.h.

由于根据这种问题,原因可能是由于cyclic import。意味着就像您有一个带有名称的文件first.h并且您正在导入second.h并且在second.h您导入first.h并且您不包括first.h.

Try these steps hope this will help you.

试试这些步骤,希望对你有所帮助。

target of project-> Build Phases-> Compile Sources->

target of project-> Build Phases-> Compile Sources->

delete the [found filename that cause the error in program].m

删除 [found filename that cause the error in program].m

Add it back again in you project.

在您的项目中再次添加它。

enter image description here

在此处输入图片说明

CleanYour iOS project And then BuildAgain.

Clean你的 iOS 项目然后Build再一次。

enter image description here

在此处输入图片说明

回答by Aqib Mumtaz

I dragged folder in XCode, it started appearing blue and files in that folder wasn't accessible in Project anywhere although they does exists in blue folder.

我在 XCode 中拖动文件夹,它开始显示为蓝色,并且该文件夹中的文件在 Project 中的任何地方都无法访问,尽管它们确实存在于蓝色文件夹中。

Solution:

I simply deleted that folder reference from project, created "New Group" and added files in it, its started working correctly.

我只是从项目中删除了该文件夹引用,创建了“新组”并在其中添加了文件,它开始正常工作。

enter image description here

在此处输入图片说明

回答by quarac

I was facing this error after a merge from the repository (git). The final solution was:

从存储库 (git) 合并后,我遇到了这个错误。最终的解决方案是:

  1. Delete the files from the xcode project navigator (only deleting references).
  2. Add them again to the project (dragging from finder into the project navigator).
  1. 从 xcode 项目导航器中删除文件(仅删除引用)。
  2. 将它们再次添加到项目中(从 finder 拖到项目导航器中)。

Hope it helps!

希望能帮助到你!

回答by chickengirl

Use the search bar in the Target -> Build Phases window to make sure the missing file's .m is listed under the Compile Sources and the .h file is listed under the Copy Files. If it's not there, add it.

使用 Target -> Build Phases 窗口中的搜索栏确保丢失文件的 .m 列在 Compile Sources 下,而 .h 文件列在 Copy Files 下。如果它不存在,请添加它。

I was able to fix this problem by adding the missing .h file.

我能够通过添加丢失的 .h 文件来解决这个问题。

回答by Bigood

Check that your corresponding frameworks are included in your bundle.

检查您的包中是否包含相应的框架。

For that, access to your project settings, select your target, and under Build Phases, check on the "Link binaries with libraries" section that your frameworks are here.

为此,访问您的项目设置,选择您的目标,然后在构建阶段下,检查您的框架在此处的“链接二进制文件与库”部分。