Ios 错误:分段错误:11(来自项目的目标中)

Ios 错误:分段错误:11(来自项目的目标中),ios,xcode,build,rx-swift,reactive,Ios,Xcode,Build,Rx Swift,Reactive,我刚刚在RxSwift中创建了我的第一个项目。名为的示例项目是RxSwift,并添加到Podfile中的pods下面 播客文件: RxSwift-主机应用程序: 我刚刚在我的ViewController(默认示例模板)中添加了import rxcocoaa,并尝试构建。结果是生成错误我错过了什么? 生成错误: 错误:分段错误:11(在项目“RxSwift”的目标“RxSwift”中) 详细信息: 0 swift 0x0000000104e4eeb3 Pri

我刚刚在
RxSwift
中创建了我的第一个项目。名为的示例项目是
RxSwift
,并添加到
Podfile
中的pods下面

播客文件: RxSwift-主机应用程序: 我刚刚在我的
ViewController
(默认示例模板)中添加了
import rxcocoaa
,并尝试构建。结果是生成错误我错过了什么?

生成错误: 错误:分段错误:11(在项目“RxSwift”的目标“RxSwift”中)

详细信息

0  swift                    0x0000000104e4eeb3 PrintStackTraceSignalHandler(void*) + 51
1  swift                    0x0000000104e4e686 SignalHandler(int) + 358
2  libsystem_platform.dylib 0x00007fff75877b5d _sigtramp + 29
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2323154112
4  swift                    0x00000001017645ff swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 463
5  swift                    0x000000010158a340 swift::performNameBinding(swift::SourceFile&, unsigned int) + 3136
6  swift                    0x0000000100da7c08 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 3608
7  swift                    0x0000000100a9db6f performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 815
8  swift                    0x0000000100a9a034 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820
9  swift                    0x0000000100a275a3 main + 1219
10 libdyld.dylib            0x00007fff7568c3d5 start + 1
11 libdyld.dylib            0x000000000000005d start + 2325167241
error: Segmentation fault: 11 (in target 'RxSwift' from project 'RxSwift')
0 swift 0x0000000104e4eeb3 PrintStackTraceSignalHandler(void*)+51
1 swift 0x0000000104e4e686信号处理器(内部)+358
2 libsystem_platform.dylib 0x00007fff75877b5d_sigtramp+29
3 libsystem_platform.dylib 000000000000000000000000_sigtramp+2323154112
4 swift 0x00000001017645ff swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc,llvm::ArrayRef)+463
5 swift 0x000000010158a340 swift::performNameBinding(swift::SourceFile&,unsigned int)+3136
6 swift 0x0000000100da7c08 swift::编译器状态::性能输出(swift::源文件::ASTStage_t)+3608
7 swift 0x0000000100a9db6f性能文件(swift::编译器立场和,swift::编译器职业和,llvm::ArrayRef,int和,swift::FrontendObserver*,swift::UnifiedStatsReporter*)+815
8 swift 0x0000000100a9a034 swift::performFrontend(llvm::ArrayRef,char const*,void*,swift::FrontendObserver*)+6820
9 swift 0x0000000100a275a3干管+1219
10 libdyld.dylib 0x00007fff7568c3d5启动+1
11 libdyld.dylib 0x000000000000005d启动+2325167241
错误:分段错误:11(在项目“RxSwift”的目标“RxSwift”中)


注意:我没有修改主机应用程序端的任何内容。我刚刚在我的
ViewController
中导入了
RxCocoa
。另外,当我从ViewController类中删除import语句时,构建也会成功。

这是针对未经处理的案例,由
Xcode
RxSwift
执行。项目目标名称不应与库名称相同,即
RxSwift
。希望Xcode足够聪明,在安装库时用适当的消息处理这种情况。在我的例子中,将项目和目标名称更改为
MyRxSwift
修复了Karthik提出的问题

请更改您的目标和项目名称“RxSwift”@Anbu.Karthik,感谢它解决了这个问题。然而,Xcode/Rx应该通过便利信息处理此类问题。
0  swift                    0x0000000104e4eeb3 PrintStackTraceSignalHandler(void*) + 51
1  swift                    0x0000000104e4e686 SignalHandler(int) + 358
2  libsystem_platform.dylib 0x00007fff75877b5d _sigtramp + 29
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2323154112
4  swift                    0x00000001017645ff swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 463
5  swift                    0x000000010158a340 swift::performNameBinding(swift::SourceFile&, unsigned int) + 3136
6  swift                    0x0000000100da7c08 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 3608
7  swift                    0x0000000100a9db6f performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 815
8  swift                    0x0000000100a9a034 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820
9  swift                    0x0000000100a275a3 main + 1219
10 libdyld.dylib            0x00007fff7568c3d5 start + 1
11 libdyld.dylib            0x000000000000005d start + 2325167241
error: Segmentation fault: 11 (in target 'RxSwift' from project 'RxSwift')