xcode 警告:没有规则来处理架构 armv7 的 javascript
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4430786/
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
warning : No Rule to process javascript for architecture armv7
提问by Ksinak
I am getting a warning when I try to run JavaScript with Cocoa:
当我尝试使用 Cocoa 运行 JavaScript 时收到警告:
warning: no rule to process file '$(PROJECT_DIR)/myJavaScriptFile.js' of type sourcecode.javascript for architecture armv7
回答by Xiao Xiao
remove myJavaScriptFile.js
from your Xcode Product Target\'Compile Sources'
and it'll be ok
myJavaScriptFile.js
从你的Xcode Product Target\'Compile Sources'
身上移除就可以了
回答by FunkyKat
Remove .js file from Compile Sources and add to Copy Bundle Resources in a Build Phases page (if you want to access this file in your application through
从 Compile Sources 中删除 .js 文件并添加到 Build Phases 页面中的 Copy Bundle Resources(如果您想通过
[NSBundle mainBundle] pathForResource:@"myJavaScriptFile.js"]
)
)
回答by Stéphane de Luca
I propose a work around I use, which streamline the process when you have to update on regular basis your javascript, by getting rid of any additional manual operation.
我提出了一个我使用的解决方法,它通过摆脱任何额外的手动操作来简化您必须定期更新 javascript 的过程。
Say you have a file name code.js included in a code.html.
假设您的文件名 code.js 包含在 code.html 中。
simply rename code.js into code.js.html and don't forget to change your inclusion tag in the html as follows:
只需将 code.js 重命名为 code.js.html 并且不要忘记更改 html 中的包含标签,如下所示:
<script src="code.js"></script>
into
进入
<script src="code.js.html"></script>
Then you simply have to add code.js.html and code.html to your resource straight into xcode and voila!
然后你只需要将 code.js.html 和 code.html 添加到你的资源中,直接进入 xcode 和瞧!
回答by Faisal Memon
The way to fix this is to click on the myJavaScriptFile.js
file in the left hand pane of Xcode. Then on the right hand pane, highlight the File Inspector (the first icon) and then look at the Target Membership section. You will find that it is ticked for at least one of your Build Targets. Untick it from all Targets. Then do a Cmd-Shift-K Clean and then a Cmd-Shift-B Analyse.
解决此问题的方法是单击myJavaScriptFile.js
Xcode 左侧窗格中的文件。然后在右侧窗格中,突出显示 File Inspector(第一个图标),然后查看 Target Membership 部分。您会发现它至少为您的构建目标之一打勾。从所有目标中取消它。然后执行 Cmd-Shift-K Clean,然后执行 Cmd-Shift-B 分析。