gpt4 book ai didi

ios - Xcode 上的空 Cocotouch 框架出错?

转载 作者:行者123 更新时间:2023-11-29 06:02:06 25 4
gpt4 key购买 nike

我创建了一个 cocoatcouch 框架,一旦我向项目添加一个空白的 swift 文件,我就会收到一个错误:

An internal error has occurred. Source editor functionality is limited. Attempting to restore.

项目的语言设置为 swift

<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:

最佳答案

出现这个问题主要是因为多个XCode。

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

enter image description here

关于ios - Xcode 上的空 Cocotouch 框架出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54546286/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com