2017-09-02 2 views
0

私は基本的なReact Nativeアプリを作成しようとしています。私はプロジェクトを作成することができますが、シミュレータの内部では実行されません。このようにReact Nativeアプリを作成すると何が問題になりますか?

アプリが読み込まれるとすぐに終了します。 node_modulesを削除して、すべてのモジュールを新しくダウンロードするためにnpm installを実行すると、アプリがJavascriptをリロードします。その後100%に達するとすぐに再び終了します。次のように

私はアプリを作成するために使用する手順は次のとおりです。

$ react-native init demo1 
$ cd demo1 
$ react-native run-ios 

文字通りだこと。ツールの次のバージョンを使用しています:

$ node --version 
v6.11.2 
$ npm --version 
3.10.10 
$ react-native --version 
react-native-cli: 2.0.1 
react-native: 0.48.0 

フルログはhereです。私は間違って何をしていますか?私はこの何かを

2017-09-02 13:03:00.775 [info][tid:main][RCTCxxBridge.mm:188] Initializing <RCTCxxBridge: 0x6080001a2ae0> (parent: <RCTBridge: 0x6000000a1f80>, executor: (null)) 
2017-09-02 13:03:00.804 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()? 
2017-09-02 13:03:00.825 [info][tid:main][RCTRootView.m:301] Running application r1 ({ 
    initialProps =  { 
    }; 
    rootTag = 1; 
}) 
2017-09-02 13:03:00.960 r1[47802:5600672] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327 
2017-09-02 13:03:00.977 r1[47802:5600672] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327' 
*** First throw call stack: 
(
    0 CoreFoundation      0x000000010e094b0b __exceptionPreprocess + 171 
    1 libobjc.A.dylib      0x000000010cf4a141 objc_exception_throw + 48 
    2 CoreFoundation      0x000000010e104134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 
    3 CoreFoundation      0x000000010e01b840 ___forwarding___ + 1024 
    4 CoreFoundation      0x000000010e01b3b8 _CF_forwarding_prep_0 + 120 
    5 r1         0x000000010c301394 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244 
    6 r1         0x000000010c301b8a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610 
    7 r1         0x000000010c3514bc -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444 
    8 CFNetwork       0x000000010daf4c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51 
    9 Foundation       0x000000010ca543b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7 
    10 Foundation       0x000000010ca540bb -[NSBlockOperation main] + 101 
    11 Foundation       0x000000010ca52877 -[__NSOperationInternal _start:] + 627 
    12 Foundation       0x000000010ca4e5fc __NSOQSchedule_f + 198 
    13 libdispatch.dylib     0x0000000111d7605c _dispatch_client_callout + 8 
    14 libdispatch.dylib     0x0000000111d5494f _dispatch_queue_serial_drain + 221 
    15 libdispatch.dylib     0x0000000111d55669 _dispatch_queue_invoke + 1084 
    16 libdispatch.dylib     0x0000000111d57ec4 _dispatch_root_queue_drain + 634 
    17 libdispatch.dylib     0x0000000111d57bef _dispatch_worker_thread3 + 123 
    18 libsystem_pthread.dylib    0x000000011210d5a2 _pthread_wqthread + 1299 
    19 libsystem_pthread.dylib    0x000000011210d07d start_wqthread + 13 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 

が、これはバグのいくつかの並べ替えですかです:


このよりの調査では、それはXcodeプロジェクトは、スタックトレースで失敗が判明しますか?

答えて

4

これは0.48の問題のようです。 0.47.1を試してみてください。うまくいくはずです。

react-native init demo1 --version [email protected] 
0

この問題は、RN 0.48.1で修正されています。新しいプロジェクトを作成した場合(2017年9月4日現在)、この問題は発生しません。

関連する問題