迁移到Xcode 10后出现多个错误

问题描述 投票:1回答:2

更新到Xcode 10后,我在项目中遇到以下错误:

第一个错误:

:-1:多个命令产生'/Users/maropost/Library/Developer/Xcode/DerivedData/MPPush-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/MPPush.framework/Info.plist':1)目标'MPPush'(项目'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 /编译/产品/调试-的iPhoneOS / MPPush.framework / Info.plist中”

第二个错误:

无法删除/Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/build,因为它不是由构建系统创建的,也不是派生数据的子文件夹。

第三个错误:

命令PhaseScriptExecution发出错误但未返回非零退出代码以指示失败

已经检查过this但不相关。

ios xcode xcode10
2个回答
3
投票

我遇到了同样的问题。请按照以下步骤操作,我相信它对您有用。

在Xcode中,转到文件 - >项目/工作区设置。

在Xcode中,转到Advanced - > Select Legacy。

它会对你有用。请在下面查看每个操作的屏幕截图。

Step 1

Step 2

Step 2

更新:

再次构建项目时,将重新创建DerivedData的所有内容。

我建议你清理项目项目并再次构建,还请确认你的删除Derived Data文件夹不在BIN中请清理垃圾,这很重要

检查Build Phase中的Copy Bundle Resources,您应该在该列表中找到一些文件(应该是您的情况下的图像)两次。删除它们并重建。


2
投票

对于以下错误:

无法删除/ Users / maropost / Documents / Work / iOS / Products / SDK / SwiftFromStart / MPPush / build,因为它不是由构建系统创建的,也不是派生数据的子文件夹。

根据https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10

解决方法是手动删除框架项目目录中的构建文件夹。希望这可以帮助!

© www.soinside.com 2019 - 2024. All rights reserved.