iOS开发,刚接手React-native,遇到的问题,求教!

qq_35546420 2017-02-13 03:25:42
我是用react-native创建了个新应用,但是用Xcode运行,程序崩溃,以下是日志:
2017-02-13 15:13:28.929 [info][tid:main][RCTBatchedBridge.m:72] Initializing <RCTBatchedBridge: 0x60800018a4f0> (parent: <RCTBridge: 0x6080000ac960>, executor: RCTJSCExecutor)
2017-02-13 15:13:28.931 AwesomeProject[14469:275275] *** Assertion failure in -[RCTBatchedBridge loadSource:onProgress:](), /Users/pbph/AwesomeProject/node_modules/react-native/React/Base/RCTBatchedBridge.m:196
2017-02-13 15:13:28.935 AwesomeProject[14469:275275] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bundleURL must be non-nil when not implementing loadSourceForBridge'
*** First throw call stack:
(
0 CoreFoundation 0x0000000107e8d34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000106d9b21e objc_exception_throw + 48
2 CoreFoundation 0x0000000107e91442 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000106967d79 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 AwesomeProject 0x000000010647de95 -[RCTBatchedBridge loadSource:onProgress:] + 997
5 AwesomeProject 0x000000010647c003 -[RCTBatchedBridge start] + 883
6 AwesomeProject 0x00000001064b54cc -[RCTBridge setUp] + 684
7 AwesomeProject 0x00000001064b4753 -[RCTBridge initWithDelegate:bundleURL:moduleProvider:launchOptions:] + 387
8 AwesomeProject 0x00000001064b4562 -[RCTBridge initWithBundleURL:moduleProvider:launchOptions:] + 146
9 AwesomeProject 0x0000000106417137 -[RCTRootView initWithBundleURL:moduleName:initialProperties:launchOptions:] + 183
10 AwesomeProject 0x00000001064006d5 -[AppDelegate application:didFinishLaunchingWithOptions:] + 245
11 UIKit 0x000000010a3ff0be -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
12 UIKit 0x000000010a400a43 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
13 UIKit 0x000000010a406de9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
14 UIKit 0x000000010a403f69 -[UIApplication workspaceDidEndTransaction:] + 188
15 FrontBoardServices 0x000000010d89c723 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
16 FrontBoardServices 0x000000010d89c59c -[FBSSerialQueue _performNext] + 189
17 FrontBoardServices 0x000000010d89c925 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
18 CoreFoundation 0x0000000107e32311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x0000000107e1759c __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x0000000107e16a86 __CFRunLoopRun + 918
21 CoreFoundation 0x0000000107e16494 CFRunLoopRunSpecific + 420
22 UIKit 0x000000010a4027e6 -[UIApplication _run] + 434
23 UIKit 0x000000010a408964 UIApplicationMain + 159
24 AwesomeProject 0x0000000106400aaf main + 111
25 libdyld.dylib 0x000000010bddf68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
不知道哪地方出问题了?求赐教!谢谢
...全文
1041 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
peter_Duang 2017-09-27
  • 打赏
  • 举报
回复
解决了吗?我也遇到同样的问题了
摸黑走路 2017-02-22
  • 打赏
  • 举报
回复
把Shadowsocks全局模式设为自动代理模式,或者关掉Shadowsocks
scribbler 2017-02-14
  • 打赏
  • 举报
回复
在loadSourceForBridge方法里bundleURL不能为nil
qq_35546420 2017-02-14
  • 打赏
  • 举报
回复
引用 1楼公交哥 的回复:
,楼主为什么能邀请到我呢? 不好意思,我不做ios,爱莫能助,
好吧,谢谢
qq_35546420 2017-02-14
  • 打赏
  • 举报
回复
引用 3楼曾梦轩 的回复:
看一下你的APPdelegate.m这个文件
qq_35546420 2017-02-14
  • 打赏
  • 举报
回复
引用 6楼scribbler 的回复:
在loadSourceForBridge方法里bundleURL不能为nil
那这个bandleUrl该怎么写呢?
曾梦轩 2017-02-13
  • 打赏
  • 举报
回复
看一下你的APPdelegate.m这个文件
爱睡觉的阿狸 2017-02-13
  • 打赏
  • 举报
回复
,楼主为什么能邀请到我呢? 不好意思,我不做ios,爱莫能助,

29,028

社区成员

发帖
与我相关
我的任务
社区描述
主要讨论与iOS相关的软件和技术
社区管理员
  • iOS
  • 大熊猫侯佩
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧