在Xcode中出现了错误的空Cocoatouch框架?

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

我创建了一个cocoatcouch框架,只要我一个空白迅速文件添加到项目中,我得到一个错误:

发生内部错误。源代码编辑器的功能是有限的。尝试恢复。

该项目的语言设置为快捷

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/Darwin.h"
        ^
/Users/aryan.ghassemi/Desktop/Darwin/Darwin/Darwin.h:9:9: error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
        ^
<unknown>:0: error: could not build Objective-C module 'Darwin'
0  swift                    0x0000000104cf959a PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x0000000104cf8d4e SignalHandler(int) + 302
2  libsystem_platform.dylib 0x00007fff7966eb3d _sigtramp + 29
3  libsystem_platform.dylib 0x00007fd4e542118f _sigtramp + 1809524335
4  swift                    0x000000010223504b swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 891
5  swift                    0x000000010237dbb3 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 227
6  swift                    0x000000010205bf7c swift::performNameBinding(swift::SourceFile&, unsigned int) + 2028
7  swift                    0x0000000101d938e3 swift::CompilerInstance::performSema() + 3379
8  swift                    0x0000000100f7f50b performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 731
9  swift                    0x0000000100f7bd35 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7717
10 swift                    0x0000000100f21965 main + 1349
11 libdyld.dylib            0x00007fff79483ed9 start + 1
12 libdyld.dylib            0x000000000000004c start + 2260189556
Stack dump:
ios swift xcode cocoa-touch
1个回答
0
投票

发生此问题,因为多个XCodes为主。

安装命令行工具,并尝试设置在下面的图像相同的工具版本。

enter image description here

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