我正在构建一个React Native 0.57应用程序,它在IOS上运行良好,但在Android上失败,错误如下:
Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead.
throwOnInvalidObjectType ReactNativeRenderer-dev.js:8779:6
reconcileChildFibers ReactNativeRenderer-dev.js:9842:31
reconcileChildren ReactNativeRenderer-dev.js:10319:6
updateHostRoot ReactNativeRenderer-dev.js:10683:6
beginWork ReactNativeRenderer-dev.js:11360:28
performUnitOfWork ReactNativeRenderer-dev.js:14091:21
workLoop ReactNativeRenderer-dev.js:14129:41
renderRoot ReactNativeRenderer-dev.js:14226:15
performWorkOnRoot ReactNativeRenderer-dev.js:15193:17
performWork ReactNativeRenderer-dev.js:15090:24
performSyncWork ReactNativeRenderer-dev.js:15047:14
requestWork ReactNativeRenderer-dev.js:14925:19
scheduleWork ReactNativeRenderer-dev.js:14711:16
scheduleRootUpdate ReactNativeRenderer-dev.js:15429:15
updateContainerAtExpirationTime ReactNativeRenderer-dev.js:15462:28
updateContainer ReactNativeRenderer-dev.js:15494:4
render ReactNativeRenderer-dev.js:16142:20
renderApplication renderApplication.js:59:34
run AppRegistry.js:101:10
runApplication AppRegistry.js:195:26
__callFunction MessageQueue.js:349:47
<unknown> MessageQueue.js:106:26
__guard MessageQueue.js:297:10
callFunctionReturnFlushedQueue MessageQueue.js:105:17
我在网上搜索了一下(当然),大家都在谈论我不使用的firebase。
据我所知,使用RN 0.56,一切都很正常,自从升级到0.57之后,这个错误就开始发生了。
解决方法是启用调试器。。。但这次释放也面临着同样的问题。
由于该应用程序在IOS上运行,我想这是来自android项目。
我如何调查这个问题?
import 'core-js'
到了山顶
index.js
应用程序的文件正在避免错误。
core-js
react-native
本身。