Xcode 10 - 多个命令生成 .app
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52518763/
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 10 - Multiple commands produce .app
提问by mag_zbc
I have a project that I developed with Xcode 9, and after switching to Xcode 10 I get an error during build:
我有一个使用 Xcode 9 开发的项目,在切换到 Xcode 10 后,在构建过程中出现错误:
error: Multiple commands produce 'SomePath/MyApp.app':
1) Target 'MyApp' has create directory command with output '/SomePath/Kvitt.app'
2) That command depends on command in Target 'MyApp': script phase “[CP] Copy Pods Resources”
错误:多个命令生成“SomePath/MyApp.app”:
1)目标“MyApp”已创建带有输出“/SomePath/Kvitt.app”的目录命令
2)该命令取决于目标“MyApp”中的命令:脚本阶段“[ CP] 复制 Pod 资源”
I had a similar issue with different project and Info.plist
file, and I solved it using this answer
我在不同的项目和Info.plist
文件中遇到了类似的问题,我使用这个答案解决了它
However, this time the error refers to MyApp.app
, and there is no such file in Copy Bundle Resources
但是,这次的错误是指向MyApp.app
,并且Copy Bundle Resources中没有这样的文件
Switching to Legacy Build Systemmakes this go away, but want to know what's causing this and how to fix it in new build system
切换到Legacy Build System会使这个问题消失,但想知道是什么导致了这个问题以及如何在新的构建系统中修复它
Any ideas?
有任何想法吗?
回答by Asp Upload
I've got the same issue. If you are using Cocoapods, then you can solve the issue by upgrading to Cocoapods 1.5.3 from 1.4.0. as suggested in this post:
我有同样的问题。如果您使用的是 Cocoapods,那么您可以通过从 1.4.0 升级到 Cocoapods 1.5.3 来解决该问题。正如这篇文章中所建议的:
After that, just do pod install
in the terminal.
之后,只需pod install
在终端中进行即可。
回答by Shubham Narang
I have got the same issue : Build error in Xcode 10 "Multiple commands produce...
我遇到了同样的问题:Xcode 10 中的构建错误“多个命令产生...
:-1: Multiple commands produce '/Users/m/Library/Developer/Xcode/DerivedData/FAR-
axuthwysrkuqbcdvfglntqgbiugn/Build/Products/Debug-
iphonesimulator/F.A.R.app/.gitkeep':
1) Target 'FAR' (project 'FAR') has copy command from '/Users/m/Desktop/Shubham
Code/Backup/Shubham 2018/SVN
Codes/FAR/FAR/FAR/ThirdParty/BPStatusBarAlert/Assets/.gitkeep' to
'/Users/m/Library/Developer/Xcode/DerivedData/FAR-
axuthwysrkuqbcdvfglntqgbiugn/Build/Products/Debug-iphonesimulator/F.A.R.app/.gitkeep'
2) Target 'FAR' (project 'FAR') has copy command from '/Users/m/Desktop/Shubham
Code/Backup/Shubham 2018/SVN
Codes/FAR/FAR/FAR/ThirdParty/BPStatusBarAlert/Classes/.gitkeep' to
'/Users/m/Library/Developer/Xcode/DerivedData/FAR-
axuthwysrkuqbcdvfglntqgbiugn/Build/Products/Debug-iphonesimulator/F.A.R.app/.gitkeep'
This can be resolved by following below steps :
这可以通过以下步骤解决:
Step 1 : Go to build Phases.
第 1 步:去构建阶段。
Step 2 : Copy bundle resources and remove the .gitkeep file.
第 2 步:复制捆绑资源并删除 .gitkeep 文件。
Step 3 :Build and Success.
第 3 步:建立和成功。
In your case some other file will create issue, So check the file name and delete it.
在您的情况下,其他一些文件会产生问题,因此请检查文件名并将其删除。
As per my investigation, issue is because of duplicacy of file.
根据我的调查,问题是由于文件重复。
Happy Coding.
快乐编码。