Javascript 看起来u DEV_u_u的实现方式已经改变了。更新-[RCTBatchedBridge加载源:]
当我尝试准备我的react本机应用程序在设备上运行时,该应用程序会终止,并出现以下错误,我无法理解。我已经读到,节点需要是+4版本,但我正在运行4.1.2,所以我不认为这就是它。有什么想法吗Javascript 看起来u DEV_u_u的实现方式已经改变了。更新-[RCTBatchedBridge加载源:],javascript,ios,react-native,Javascript,Ios,React Native,当我尝试准备我的react本机应用程序在设备上运行时,该应用程序会终止,并出现以下错误,我无法理解。我已经读到,节点需要是+4版本,但我正在运行4.1.2,所以我不认为这就是它。有什么想法吗 TutorMeNow[81429:1527409] *** Assertion failure in __31-[RCTBatchedBridge loadSource:]_block_invoke(), /Users/spencerpope/Tutor2/node_modules/react-native
TutorMeNow[81429:1527409] *** Assertion failure in __31-[RCTBatchedBridge loadSource:]_block_invoke(), /Users/spencerpope/Tutor2/node_modules/react-native/React/Base/RCTBatchedBridge.m:204
2015-12-02 11:50:11.274 TutorMeNow[81429:1527409] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'It looks like the implementationof __DEV__ has changed. Update -[RCTBatchedBridge loadSource:].'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102574f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000101776deb objc_exception_throw + 48
2 CoreFoundation 0x0000000102574daa + [NSException raise:format:arguments:] + 106
3 Foundation 0x00000001013c36b2 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 169
4 TutorMeNow 0x000000010038ad3d __31-[RCTBatchedBridge loadSource:]_block_invoke + 861
5 TutorMeNow 0x00000001003723e3 __50+[RCTJavaScriptLoader loadBundleAtURL:onComplete:]_block_invoke + 195
6 libdispatch.dylib 0x0000000104e84e5d _dispatch_call_block_and_release + 12
7 libdispatch.dylib 0x0000000104ea549b _dispatch_client_callout + 8
8 libdispatch.dylib 0x0000000104e8dbef _dispatch_root_queue_drain + 1829
9 libdispatch.dylib 0x0000000104e8d4c5 _dispatch_worker_thread3 + 111
10 libsystem_pthread.dylib 0x00000001051d64f2 _pthread_wqthread + 1129
11 libsystem_pthread.dylib 0x00000001051d4375 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
尝试将packager url更新为in-AppDelegate(iOS)。按照升级指南,“手动更改”部分为我解决了此问题: 需要添加一个新的运行脚本阶段: 然后需要删除main.jsbundle文件:
main.jsbundle不再是必需的。选择您的设备作为XCode中的目标设备,然后点击运行按钮在设备上部署/运行。这就是当前的URL。@SpencerPope为我的URL修复问题添加platform=ios&dev=true。如果您的url包含此选项,则不知道。您是否尝试过从预绑定的js代码运行?它对你有用吗?