[英]Multiple errors after migrating to Xcode 10
After updating to Xcode 10, I am getting the following errors in my project :更新到 Xcode 10 后,我的项目出现以下错误:
First error :第一个错误:
:-1: Multiple commands produce '/Users/maropost/Library/Developer/Xcode/DerivedData/MPPush-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/MPPush.framework/Info.plist': 1) Target 'MPPush' (project 'MPPush') has copy command from '/Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/MPPush/Info.plist' to '/Users/maropost/Library/Developer/Xcode/DerivedData/MPPush-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/MPPush.framework/Info.plist' 2) Target 'MPPush' (project 'MPPush') has process command with output '/Users/maropost/Library/Developer/Xcode/DerivedData/MPPush-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/MPPush.framework/Info.plist'
:-1: 多个命令产生 '/Users/maropost/Library/Developer/Xcode/DerivedData/MPPush-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/MPPush.framework/Info.plist': 1) Target 'MPPush' (project 'MPPush') 具有从 '/Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/MPPush/Info.plist' 到 '/Users/maropost/Library/Developer/Xcode/DerivedData/MPPush 的复制命令-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/MPPush.framework/Info.plist' 2)目标'MPPush'(项目'MPPush')具有输出'/Users/maropost/Library/Developer/Xcode/DerivedData/的进程命令MPPush-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/MPPush.framework/Info.plist'
Second error :第二个错误:
Could not delete
/Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/build
because it was not created by the build system and it is not a subfolder of derived data.无法删除
/Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/build
因为它不是由构建系统创建的,也不是派生数据的子文件夹。
Third error :第三个错误:
Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure
命令 PhaseScriptExecution 发出错误,但未返回指示失败的非零退出代码
For the below error:对于以下错误:
Could not delete /Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/build because it was not created by the build system and it is not a subfolder of derived data.无法删除 /Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/build,因为它不是由构建系统创建的,也不是派生数据的子文件夹。
According to https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10根据https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10
The Workaround is to Delete the build folder manually which is in your framework's project directory.解决方法是手动删除框架项目目录中的构建文件夹。 Hope this helps!
希望这可以帮助!
I have fixed issues by enabling Legacy mode
.我通过启用
Legacy mode
解决了问题。 Do follow the below steps it will help you.请按照以下步骤操作,它会对您有所帮助。
In Xcode, Goto File -> Project/Workspace settings > Advanced -> Select Legacy
Please refer below screenshots for further assistance.请参阅以下屏幕截图以获得进一步帮助。
CLEAN + BUILD & MAKE SURE YOUR DELETED DERIVEDATA FOLDER FROM TRASH清理 + 构建并确保从垃圾箱中删除了已删除的派生数据文件夹
Check your Copy Bundle Resources in Build Phase
, You should find some files(should be images in your situation) in that list twice.在
Build Phase
检查您的复制捆绑资源,您应该在该列表中找到一些文件(在您的情况下应该是图像)两次。 Delete them and rebuild them.删除它们并重建它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.