React-Native在iOS工程中真机和模拟器dug模式下调试正常,打包发布版本时在release模式下打开程序闪退查看日志报错,这是什么原因?有遇到相同问题的吗?
-
崩溃日志:
2017-11-16 14:51:34.613 [error][tid:com.facebook.react.JavaScript] TypeError: null is not a constructor (evaluating 'new s(t,null,e)')This error is located at:
in t
in RCTView
in RCTView
in t
2017-11-16 14:51:34.626357+0800 frame[5608:47528] TypeError: null is not a constructor (evaluating 'new s(t,null,e)')This error is located at:
in t
in RCTView
in RCTView
in t
2017-11-16 14:51:34.629 [error][tid:com.facebook.react.JavaScript] TypeError: null is not a constructor (evaluating 'new s(t,null,e)')This error is located at:
in t
in RCTView
in RCTView
in t
2017-11-16 14:51:34.629364+0800 frame[5608:47528] TypeError: null is not a constructor (evaluating 'new s(t,null,e)')This error is located at:
in t
in RCTView
in RCTView
in t
2017-11-16 14:51:34.630 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: TypeError: null is not a constructor (evaluating 'new s(t,null,e)')This error is located at:
in t
in RCTView
in RCTView
in t
2017-11-16 14:51:34.630486+0800 frame[5608:47499] Unhandled JS Exception: TypeError: null is not a constructor (evaluating 'new s(t,null,e)')This error is located at:
in t
in RCTView
in RCTView
in t
2017-11-16 14:51:34.667229+0800 frame[5608:47499] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: TypeError: null is not a constructor (evaluating 'new s(t,null,e)')This error is located at:
in t
in RCTView
in RCTView
in t', reason: 'Unhandled JS Exception: TypeError: null is not a constructor (evaluating 'n..., stack:
n@359:176
open@359:1158
l@359:465
open@349:4441
y@349:2080
connect@368:1245
connect@348:177
f@342:1430
<unknown>@342:3637
<unknown>@333:358
t@303:564
constructClassInstance@46:48884
<unknown>@46:51984
......
......
-
debug模式运行在chrome的v8引擎上,非debug模式运行在ios的javascriptCore引擎上,两者存在差异的
但是你这里的报错信息一是代码已压缩,二是行号对不上,所以没有太多诊断的线索
建议在模拟器上以非debug模式运行,再看日志