Ios React Native:模块RCTLog不是已注册的可调用模块
在0.29和0.30中Ios React Native:模块RCTLog不是已注册的可调用模块,ios,react-native,Ios,React Native,在0.29和0.30中 当我使用脱机捆绑包在iOS设备上运行时,始终会获得以下错误信息: 未处理的JS异常:模块RCTLog不是已注册的可调用模块。RCTFatal+124 -[RCTexceptionManager报告FatalException:stack:exceptionId::+584 +144 +296 +68 -[rctmodulemethodinvokewithbridge:module:arguments:+1684 -[RCTBatchedBridge\u handleReq
当我使用脱机捆绑包在iOS设备上运行时,始终会获得以下错误信息: 未处理的JS异常:模块RCTLog不是已注册的可调用模块。
RCTFatal+124
-[RCTexceptionManager报告FatalException:stack:exceptionId::+584
+144
+296
+68
-[rctmodulemethodinvokewithbridge:module:arguments:+1684
-[RCTBatchedBridge\u handleRequestNumber:moduleID:methodID:params:+712
\uuu 33-[RCTBatchedBridge handleBuffer:][u block\u invoke.452+1144
捆绑:
react-native bundle --entry-file ./index.ios.js --platform ios --dev false --bundle-output ./Example/index.ios.jsbundle --assets-dest ./Example/ --verbose
如果有人遇到同样的问题,我如何解决它,谢谢。您是否在index.ios.js文件中导入React?添加
var RCTLog=require('RCTLog')代码>至index.ios.js
这实际上是一个bug,我就是这样解决的
终止metro bundler>react native链接
react native运行ios
它没有绑定,因为一些错误没有显示在模拟器中,只是绑定失败了。在我从开始重新绑定包之后,它向我显示了错误,然后我解决了它们,然后错误也消失了。是的,导入了它。当我运行在线捆绑包时,一切都很好,但不是在离线捆绑包中。升级到RN 0.31。