在衍生数据中找不到.app文件

当试图编译我的项目,我得到这个错误,想知道如果有人知道如何解决它?

我已经阅读了所有关于这种链接器错误的答案和互联网上的其他地方。 我已经尝试了很多解决scheme,包括非常受欢迎的xcode中删除的数据,完全退出xcode,在命令行上再次删除它,然后重新启动xcode – 仍然没有任何结果。 这是在我尝试将设备附加到我的计算机(我从组织者中删除了该设备)后开始的,这是一个朋友试图在iPad上运行的设备。 我在我的智慧结束,不能再浪费时间了。 任何想法如何解决它?

Products文件夹中的应用程序文件是红色的。

编辑:更多信息:实际的应用程序没有被build立,并放在图书馆/开发/ {应用程序} /生成/产品文件夹。 我已经尝试重新连接设备,并从苹果网站手动添加configuration文件,然后尝试生成 – >select设备时存档应用程序。 我仍然得到错误。 我已经尝试从debugging更改为释放在scheme和所有这一切,我仍然得到错误。 我试图卸载xcode并重新安装它,删除完全离开计算机的应用程序(包括派生的数据)从Git拉下来,我得到同样的错误。

Ld /Users/mischabuckler/Library/Developer/Xcode/DerivedData/TRx-clxlusutxvcrlkddtqwtoxibcmhc/Build/Products/Debug-iphonesimulator/UnitTests.octest/UnitTests normal i386 cd / Users / mischabuckler / Desktop / Git / TRx setenv IPHONEOS_DEPLOYMENT_TARGET 6.1 setenv PATH“ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin :/ sbin“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/ Developer / SDKs / iPhoneSimulator6.1.sdk -L / Users / mischabuckler / Library / Developer / Xcode / DerivedData / TRx-clxlusutxvcrlkddtqwtoxibcmhc / Build / Products / Debug-iphonesimulator -F / Users / mischabuckler / Library / Developer / Xcode / DerivedData / TRx-clxlusutxvcrlkddtqwtoxibcmhc / Build / Products / Debug-iphonesimulator -F / Applications / Xcode.app / Contents / Developer / Platf orms / iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator6.1.sdk / Developer / Library / Frameworks -F / Applications / Xcode.app / Contents / Developer / Library / Frameworks -filelist / Users / mischabuckler / Library / Developer / Xcode / DerivedData / TRx-clxlusutxvcrlkddtqwtoxibcmhc / Build / Intermediates / TRx.build / Debug-iphonesimulator / UnitTests.build / Objects-normal / i386 / UnitTests.LinkFileList -bundle_loader / Users / mischabuckler / Library / Developer / Xcode / DerivedData / TRx-clxlusutxvcrlkddtqwtoxibcmhc / Build / Products / Debug-iphonesimulator / TRx.app / TRx -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version -min = 6.1 -framework SenTestingKit -framework UIKit -framework Foundation -o /Users/mischabuckler/Library/Developer/Xcode/DerivedData/TRx-clxlusutxvcrlkddtqwtoxibcmhc/Build/Products/Debug-iphonesimulator/UnitTests.octest/UnitTests

ld:file not found:/Users/mischabuckler/Library/Developer/Xcode/DerivedData/TRx-clxlusutxvcrlkddtqwtoxibcmhc/Build/Products/Debug-iphonesimulator/TRx.app/TRx clang:error:linker command failed with exit code 1(use – v看到调用)

当您重命名主目标时,会发生这种情况,并且testing目标尚未更新。 检查testing目标中的构build设置,确保path指向新的文件夹。 例如,如果您将目标SuperAwesome重命名为Super,那么您的testing目标就是期待SuperAwesome.app/文件夹中的文件更新为Super.app /

好的,虽然难以发现,但是你上面发布的消息不是构build你的应用,而是你的unit testing。 它也在输出窗口的顶部提到它,但是不要指望改变。

你可能会重命名你的scheme,这样做的unit testing是指向你的真正的构build或别的东西。 你的应用程序可能实际上已经build好,但其unit testing目标失败。

如果问题在于你已经在UnitTestscheme中重新命名了目标,那么就去build立设置并searchTEST,这会启动TEST HOST的设置。 确保这些值指向你想要testing应用程序被调用,而不是主要的可执行文件。

对我来说,只是在testing目标的TEST_HOST的debugging和释放设置上追加了“test”。

这一切都为我现在build立,虽然恼人的是它实际上是build立两个目标 – 至less他们都编译。

所以对于任何人谁发现这一点,并感到沮丧,我最终做的是删除我的应用程序和unit testing的目标依赖项,然后构build应用程序一次,然后重新添加它们,并再次build立应用程序,它工作正常。

尝试复制目标,然后使用目标副本运行。

我讨厌Mach-o链接器的错误,令人沮丧,无论如何,我通过创build一个新的scheme面临同样的问题,它对我来说就像魔术一样。 添加新的方案

转到项目 – >生成设置 – >testing – >testing主机删除testing主机中的所有path,并做一个干净的生成。

尝试运行清理,然后生成/运行该项目

在这里输入图像说明