在Xcode中构建项目时,我遇到了以下错误:

ld:找不到文件

/用户/MacBookPro/Library/Developer/Xcode/DerivedData/Social_事件-cfnteabiivwfdzcoulzznhmgobhy/Build/Products/Debug iphoneos/Social_事件.应用程序/社交活动

在过go 的一个小时里,我一直在纠结这个错误..有什么解决办法吗?

使用框架:

  • 核心电话
  • Mapkit
  • 脸谱网.sdkv3.20
  • 地基
  • 核心图形
  • UIKit框架

完全错误:

<pre>
Ld /Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Intermediates/Social_Events.build/Debug-iphoneos/Social_EventsTests.build/Objects-normal/arm64/Social_EventsTests normal arm64
    cd /Users/MacBookPro/Desktop/Social_Events/Social_Events/Social_Events
    export IPHONEOS_DEPLOYMENT_TARGET=7.1
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
</pre>

>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Products/Debug-iphoneos -F/Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/Library/Frameworks -filelist /Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Intermediates/Social_Events.build/Debug-iphoneos/Social_EventsTests.build/Objects-normal/arm64/Social_EventsTests.LinkFileList -dead_strip -bundle_loader /Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Products/Debug-iphoneos/Social_Events.app/Social_Events -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.1 -framework XCTest -framework UIKit -framework 地基 -Xlinker -dependency_info -Xlinker /Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Intermediates/Social_Events.build/Debug-iphoneos/Social_EventsTests.build/Objects-normal/arm64/Social_EventsTests_dependency_info.dat -o /Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Intermediates/Social_Events.build/Debug-iphoneos/Social_EventsTests.build/Objects-normal/arm64/Social_EventsTests

>ld:找不到文件: /Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Products/Debug-iphoneos/Social_Events.app/Social_Events
clang: error: linker command failed with exit code 1 (use -v to see invocation)

>(null): File not found: /Users/MacBookPro/Library/Developer/Xcode/DerivedData/Social_Events-cfnteabiivwfdzcoulzznhmgobhy/Build/Products/Debug-iphoneos/Social_Events.app/Social_Events

推荐答案

您可能会收到此错误,因为您重命名了项目,但再也找不到Tests.这很容易解决:

在Xcode中解决它,如下所示:

  1. 从项目导航器中 Select 项目.
  2. 在目标下 Select [Your project's Tests]
  3. General选项卡下,从下拉列表中更改Host Application
  4. 构建并运行.

屏幕截图

这个问题发生在我身上,因为我重新命名了我的项目,测试再也找不到它了.

Objective-c相关问答推荐

UITextField secureTextEntry 带有自定义字体的项目符号?

当我们只能使用 NSObject 时,为什么还要使用 id?

我应该为 memcpy 和 realloc 包含什么标题?

Objective C 中的多个委托

Objective-C 静态、外部、公共变量

UIApplication.sharedApplication.delegate.window 和 UIApplication.sharedApplication.keyWindow 有什么区别?

Xcode 是否支持区域?

iPhone:推送通知后如何删除徽章?

如何从 Xcode4 生成 UML 图

实现 -hash / -isEqual: / -isEqualTo...: 用于 Objective-C 集合

检测代码是否在 Objective-C 的主线程上运行的正确方法是什么? (iOS)

如何在情节提要场景中嵌入自定义视图 xib?

dyld:找不到符号:try 运行 iOS 应用程序时的 _NSURLAuthenticationMethodClientCertificate

了解 performSegueWithIdentifier

如何确定 UICollectionView flowLayout 中单元格之间的间距

关闭一次后如何返回允许推送通知对话框?

在字符串Objective-c中连接字符串

IOHIDFamily 的神秘控制台错误

何时在 iPhone 上使用 UIView 与 UIViewController?

在 Objective-C 中计算两个日期之间的天数