xcode 中的 iphonesimulator(未找到 SDK)错误

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

iphonesimulator (SDK not found) error in xcode

iosxcodeios-simulatorunity3dlinker-errors

提问by pretender

I've been trying to resolve this issue for a while now. The reason I am trying to build for a simulator is to get screenshot on a retina 4 inch display which is now required in the appstore. I am making an app with unity and i see from the forums that people are successful in making simulator builds.

我已经尝试解决这个问题一段时间了。我尝试为模拟器构建的原因是在应用商店中现在需要的 Retina 4 英寸显示器上获取屏幕截图。我正在制作一个统一的应用程序,我从论坛中看到人们成功地制作了模拟器。

When making regular build for iphone/ipad I dont have any errors, but opening my project (in unity it is marked as simulator) and trying to build it to simulator fails with linker errors (see below). It's obvious that "iphonesimulator (SDK not found)" message in Architecture -> Base SDK selection list. Although when checking to preferences -> downloads, all simulators are installed. I am able to manually start a simulator

在为 iphone/ipad 进行常规构建时,我没有任何错误,但是打开我的项目(统一标记为模拟器)并尝试将其构建到模拟器失败并出现链接器错误(见下文)。很明显"iphonesimulator (SDK not found)" message in Architecture -> Base SDK selection list。尽管在检查首选项 -> 下载时,所有模拟器都已安装。我可以手动启动模拟器

I am beginner to iphone/ipad development, especially in Xcode and I was searching through the forums about this problem and did not find anything that would resolve my problem. Can anybody point me in the right direction? What should I try and where should I look out for errors?

我是 iphone/ipad 开发的初学者,尤其是在 Xcode 中,我在论坛上搜索有关此问题的内容,但没有找到任何可以解决我的问题的内容。有人能指出我正确的方向吗?我应该尝试什么,我应该在哪里寻找错误?

Thank you!

谢谢!

ld: warning: directory not found for option '-L"/Users/mirko/Dropbox/Unity'
ld: warning: directory not found for option '-LProjects/Project3D'
ld: warning: directory not found for option '-LProject/Project3D/Builds/iOS/S3D"'
ld: warning: directory not found for option '-L"/Users/mirko/Dropbox/Unity'
ld: warning: directory not found for option '-LProjects/Project3D'
ld: warning: directory not found for option '-LProject/Project3D/Builds/iOS/S3D/Libraries"'
0  0x10a87b098  __assert_rtn + 144
1  0x10a87e431  mach_o::relocatable::Section<x86>::addRelocFixup(mach_o::relocatable::Parser<x86>&, macho_relocation_info<Pointer32<LittleEndian> > const*) + 1781
2  0x10a88e636  mach_o::relocatable::Section<x86>::makeFixups(mach_o::relocatable::Parser<x86>&, mach_o::relocatable::Parser<x86>::CFI_CU_InfoArrays const&) + 90
3  0x10a88aaad  mach_o::relocatable::Parser<x86>::parse(mach_o::relocatable::ParserOptions const&) + 1433
4  0x10a8820c3  mach_o::relocatable::Parser<x86>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 313
5  0x10a87faa1  mach_o::relocatable::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 149
6  0x10a8a033a  archive::File<x86>::makeObjectFileForMember(archive::File<x86>::Entry const*) const + 794
7  0x10a89fb50  archive::File<x86>::forEachAtom(ld::File::AtomHandler&) const + 198
8  0x10a8b176c  ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&) + 420
9  0x10a8ba884  ld::tool::Resolver::resolve() + 44
10  0x10a87b380  main + 370
11  0x10a86ccd4  start + 52
A linker snapshot was created at:
    /tmp/Project3DSystem-2013-02-20-134511.ld-snapshot
ld: Assertion failed: (src.atom != NULL), function addRelocFixup, file /SourceCache/ld64/ld64-136/src/ld/parsers/macho_relocatable_file.cpp, line 5468.

回答by JCodes13

Try reinstalling xcode unless you already did that.

除非您已经这样做,否则请尝试重新安装 xcode。

回答by sunkehappy

I have a similar problem in my project but I'm not using Unity3D. I've find some material related to this:

我的项目中有类似的问题,但我没有使用 Unity3D。我找到了一些与此相关的材料:

Yes,I had met this problem at my frist time to run a game on simulator. At last I found the SDK version must be the same .if you selected 4.1 in unity3d, then you must run it on 4.1 version simulator. Does it give you any helps?

是的,我第一次在模拟器上运行游戏时遇到了这个问题。最后我发现sdk版本必须一样。如果你在unity3d中选择了4.1,那么你必须在4.1版本的模拟器上运行它。它对你有什么帮助吗?

Original link:iphonesimulator (SDK not found)

原文链接:iphonesimulator(找不到SDK)

回答by Kumar C

Check you deployment target and set it to 4.3 or higher. Also see Objective C/C++ compiler and set it Apple LLVm Compiler 5.0 (xcode 5) .

检查您的部署目标并将其设置为 4.3 或更高版本。另请参阅 Objective C/C++ compiler 并将其设置为 Apple LLVm Compiler 5.0 (xcode 5) 。

After this check you base SDK in build settings and change make sure it is set iOS Latest 7.0 or whatever latest SDk you have.

在此检查之后,您将 SDK 建立在构建设置中并进行更改,确保将其设置为 iOS 最新 7.0 或您拥有的任何最新 SDk。

You have to check deployment target both in target and project icon in prject settings pane.

您必须在项目设置窗格中的目标和项目图标中检查部署目标。