Xcode 警告:当构建阶段有此文件时,没有处理文件的规则?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22778021/
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 warning : no rule to Process file when build phases has this file?
提问by Priyank Gandhi
Check dependencies
检查依赖项
warning: no rule to process file '/Users/priyankgandhi/Desktop/priyank/WalkUpAlarmRailways/Reachability.h' of type sourcecode.c.h for architecture i386
警告:没有规则来处理架构 i386 的 sourcecode.ch 类型的文件“/Users/priyankgandhi/Desktop/priyank/WalkUpAlarmRailways/Reachability.h”
warning: no rule to process file '/Users/priyankgandhi/Desktop/priyank/WalkUpAlarmRailways/Reachability.h' of type sourcecode.c.h for architecture x86_64
警告:没有规则来处理架构 x86_64 的 sourcecode.ch 类型的文件“/Users/priyankgandhi/Desktop/priyank/WalkUpAlarmRailways/Reachability.h”
How to solve it?
如何解决?
回答by Neenu
Follow these steps,
按着这些次序,
- Select the project target
- Select the Build Phases
- Expand the Compile Source
- Remove the Header file (Reachability.h)
- 选择项目目标
- 选择构建阶段
- 展开编译源
- 删除头文件 (Reachability.h)
note : for removing the Reachability.h file from Compile Source, first select the file and then press the - button
注意:要从编译源中删除 Reachability.h 文件,请先选择该文件,然后按 - 按钮
Hope this may help you
希望这可以帮助你
回答by Shaik Riyaz
Recently i was getting this issue , the main reason was i included .h files compile resources , which we shouldn't
最近我遇到了这个问题,主要原因是我包含了 .h 文件编译资源,我们不应该这样做
so simple solution is
如此简单的解决方案是
- go to target , select build phases
- search for .h files
- delete all .h files under compile resources .
- 转到目标,选择构建阶段
- 搜索 .h 文件
- 删除 compile resources 下的所有 .h 文件。