xcode Swift 2 iOS 9 - ld:警告:找不到目录 iPhoneSimulator9.0.sdk/Developer/Library/Frameworks

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32678949/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:53:15  来源:igfitidea点击:

Swift 2 iOS 9 - ld: warning: directory not found iPhoneSimulator9.0.sdk/Developer/Library/Frameworks

xcodeswift2ios9

提问by mazorati

I have a warning in my ios appTests:

我的 ios appTests 中有一个警告:

Ld /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator/exchangerateTests.xctest/exchangerateTests normal x86_64
cd /Users/Mazorati/Projects/iOS/exchangerate
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator -F/Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -filelist /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Intermediates/exchangerate.build/Debug-iphonesimulator/exchangerateTests.build/Objects-normal/x86_64/exchangerateTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mios-simulator-version-min=8.1 -bundle_loader /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator/exchangerate.app/exchangerate -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Intermediates/exchangerate.build/Debug-iphonesimulator/exchangerateTests.build/Objects-normal/x86_64/exchangerateTests.swiftmodule -Xlinker -dependency_info -Xlinker /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Intermediates/exchangerate.build/Debug-iphonesimulator/exchangerateTests.build/Objects-normal/x86_64/exchangerateTests_dependency_info.dat -o /Users/Mazorati/Library/Developer/Xcode/DerivedData/exchangerate-fxnywlxmtfpaccbcpsmygvhirtma/Build/Products/Debug-iphonesimulator/exchangerateTests.xctest/exchangerateTests

Error:

错误:

ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks'

回答by jeanzuck

  1. Click on your project (targets)
  2. Click on Build Settings
  3. Use the arrows next to your project name (right above the Basic and All buttons) the change to the Tests target
  4. if the warning is ...for option '-L/... thats Library Search Paths, delete the stuff there
    if the warning is ...for option '-F/... thats Framework Search Paths, delete the stuff there
  5. Clean
  6. Build
  1. 单击您的项目(目标)
  2. 点击构建设置
  3. 使用项目名称旁边的箭头(在 Basic 和 All 按钮正上方)更改 Tests 目标
  4. 如果警告是...对于选项'-L/...那是库搜索路径,
    如果警告是...对于选项'-F/...那是框架搜索路径,则删除那里的内容,删除那里的内容
  5. 干净的
  6. 建造

回答by mircaea

The warning i was getting was this:

我得到的警告是这样的:

ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/Developer/Library/Frameworks'

ld:警告:找不到选项“-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/Developer/Library/Frameworks”的目录

My Framework Search Paths were empty so updating/deleting this + Clean + Rebuild did not work for me...

我的框架搜索路径是空的,所以更新/删除这个 + 清理 + 重建对我不起作用......

If you are in this situation, try deleting your projects test target.

如果您处于这种情况,请尝试删除您的项目 test target

回答by Michal Gumny

I got this warning together with 44 errors about about classes not valid for i386. What helped for me was:

我收到了这个警告以及关于对 i386 无效的类的 44 个错误。对我有帮助的是:

  • product clean
  • close Xcode
  • remove all files from ~/Library/Developer/Xcode/DerivedData
  • 产品清洁
  • 关闭 Xcode
  • 从 ~/Library/Developer/Xcode/DerivedData 中删除所有文件

回答by P.J.Radadiya

Project 'Test' file delete to solution this app.

删除项目“测试”文件以解决此应用程序。

回答by Anthony Ortiz

I receive this error when opening files from their destination in finder. However, if I open the project from X Code it works fine.

在finder中从目的地打开文件时收到此错误。但是,如果我从 X Code 打开项目,它就可以正常工作。