尝试react-native-cli基本初始化应用程序崩溃

时间:2017-09-03 17:45:02

标签: xcode react-native

我尝试了多个反应原生教程,并且每个教程都遇到了同样的问题。它似乎创建项目正确运行命令

react-native init <ProjectName>

我在Xcode 8.3.3中打开ios / Test.xcodeproj并单击运行。构建应用程序需要一些时间,在新的终端窗口中启动react-native packager,然后启动模拟器。它一直抛出这个错误:

2017-09-03 13:30:32.197 [info][tid:main][RCTCxxBridge.mm:188] Initializing <RCTCxxBridge: 0x6180001b66c0> (parent: <RCTBridge: 0x6180000aeca0>, executor: (null))
2017-09-03 13:30:32.221 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-03 13:30:32.239 [info][tid:main][RCTRootView.m:301] Running application Test ({
    initialProps =     {
    };
    rootTag = 1;
})
2017-09-03 13:30:42.801 Test[40700:1562490] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa303836393830327
2017-09-03 13:30:42.815 Test[40700:1562490] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa303836393830327'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010386ab0b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x0000000102720141 objc_exception_throw + 48
    2   CoreFoundation                      0x00000001038da134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x00000001037f1840 ___forwarding___ + 1024
    4   CoreFoundation                      0x00000001037f13b8 _CF_forwarding_prep_0 + 120
    5   Test                                0x0000000101ad5e54 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
    6   Test                                0x0000000101ad664a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
    7   Test                                0x0000000101b25f7c -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
    8   CFNetwork                           0x00000001032cac51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
    9   Foundation                          0x000000010222a3b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
    10  Foundation                          0x000000010222a0bb -[NSBlockOperation main] + 101
    11  Foundation                          0x0000000102228877 -[__NSOperationInternal _start:] + 627
    12  Foundation                          0x00000001022245fc __NSOQSchedule_f + 198
    13  libdispatch.dylib                   0x000000010754c05c _dispatch_client_callout + 8
    14  libdispatch.dylib                   0x000000010752a94f _dispatch_queue_serial_drain + 221
    15  libdispatch.dylib                   0x000000010752b669 _dispatch_queue_invoke + 1084
    16  libdispatch.dylib                   0x000000010752dec4 _dispatch_root_queue_drain + 634
    17  libdispatch.dylib                   0x000000010752dbef _dispatch_worker_thread3 + 123
    18  libsystem_pthread.dylib             0x00000001078e3712 _pthread_wqthread + 1299
    19  libsystem_pthread.dylib             0x00000001078e31ed start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException 

我尝试删除node_modules和一个新的npm安装,并在这里查看了多个答案和教程,但找不到解决方案。

0 个答案:

没有答案