我在运行我的react-native ios应用程序时遇到了一个真正的问题。我安装了Xcode(版本8.3.3)以及所需的所有其他基本依赖项,我所做的只是:
react-native init AwesomeProject
cd AwesomeProject
react-native run-ios
然后会发生什么是AwesomeProject应用程序打开一秒然后关闭。我也试过通过xcode运行它并得到同样的问题,虽然它至少报告错误:
2017-09-04 20:38:11.369 [info][tid:main][RCTCxxBridge.mm:188]
Initializing <RCTCxxBridge: 0x6000001a0540> (parent: <RCTBridge: 0x6000000a9a20>, executor: (null))
2017-09-04 20:38:11.390 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-04 20:38:11.404 [info][tid:main][RCTRootView.m:301] Running application AwesomeProject ({
initialProps = {
};
rootTag = 1;
})
2017-09-04 20:38:11.467 AwesomeProject[10363:1261593] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa383534303930327
2017-09-04 20:38:11.509 AwesomeProject[10363:1261593] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa383534303930327'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e4f4b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010d3aa141 objc_exception_throw + 48
2 CoreFoundation 0x000000010e564134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010e47b840 ___forwarding___ + 1024
4 CoreFoundation 0x000000010e47b3b8 _CF_forwarding_prep_0 + 120
5 AwesomeProject 0x000000010c7653f4 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
6 AwesomeProject 0x000000010c765bea -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
7 AwesomeProject 0x000000010c7b551c -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
8 CFNetwork 0x000000010df54c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
9 Foundation 0x000000010ceb43b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 Foundation 0x000000010ceb40bb -[NSBlockOperation main] + 101
11 Foundation 0x000000010ceb2877 -[__NSOperationInternal _start:] + 627
12 Foundation 0x000000010ceae5fc __NSOQSchedule_f + 198
13 libdispatch.dylib 0x00000001121d605c _dispatch_client_callout + 8
14 libdispatch.dylib 0x00000001121b494f _dispatch_queue_serial_drain + 221
15 libdispatch.dylib 0x00000001121b5669 _dispatch_queue_invoke + 1084
16 libdispatch.dylib 0x00000001121b7ec4 _dispatch_root_queue_drain + 634
17 libdispatch.dylib 0x00000001121b7bef _dispatch_worker_thread3 + 123
18 libsystem_pthread.dylib 0x000000011256d5a2 _pthread_wqthread + 1299
19 libsystem_pthread.dylib 0x000000011256d07d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
然后我带着以下主题8被带到这个页面:信号SIGABRT错误:
-> 0x112538d42 <+10>: jae 0x112538d4c ; <+20>
关于NSEXCEPTION我已经搜索了很多,但我似乎仍然无法运行我的应用程序。任何帮助将不胜感激
答案 0 :(得分:1)
显然,react-native 0.48.0存在问题。
您可以按照下面的主题进行操作,它应该用0.48.1修复。 https://github.com/facebook/react-native/issues/15768
编辑:我可以确认0.48.1工作正常。更新使用:
npm install -g react-native-git-upgrade
反应天然-git的升级