gpt4 book ai didi

iOS 版本构建崩溃 : TypeError: n. 渲染不是一个函数。 (在 'n.render()' 中, 'n.render' 未定义)React Native 0.56

转载 作者:行者123 更新时间:2023-11-29 05:48:23 24 4
gpt4 key购买 nike

我最近升级到了 React Native 0.56 。我遇到了很多错误,但我已经修复了大部分。但现在当我尝试在 Release模式下运行应用程序时,我收到此 js 错误。

2019-05-01 11:45:00.625 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: TypeError: n.render is not a function. (In 'n.render()', 'n.render' is undefined)

This error is located at:
in n
dyld_image_header_containing_address(0x10ba6d27d)
dladdr(0x10fcc329b, 0x7f823a8ad560)
dladdr(0x10da4f735, 0x7f823a8ad580)
dladdr(0x10ba3d6b2, 0x7f823a8ad5a0)
dladdr(0x10ba3a40c, 0x7f823a8ad5c0)
dladdr(0x10fcca11c, 0x7f823a8ad5e0)
dladdr(0x10fcc75b5, 0x7f823a8ad600)
dladdr(0x10fcc7a06, 0x7f823a8ad620)
dladdr(0x10ba50cde, 0x7f823a8ad640)
dladdr(0x10ba96a95, 0x7f823a8ad660)
dladdr(0x10ba96813, 0x7f823a8ad680)
dladdr(0x111f655d1, 0x7f823a8ad6a0)
dladdr(0x111f6663e, 0x7f823a8ad6c0)
dladdr(0x111f6db47, 0x7f823a8ad6e0)
dladdr(0x111f6e7c0, 0x7f823a8ad700)
dladdr(0x111f788b8, 0x7f823a8ad720)
dladdr(0x11231563c, 0x7f823a8ad740)
dladdr(0x112315435, 0x7f823a8ad760)
dlsym_internal(0x7f823a875030, _FSURLBeginResourcePropertyCacheAccess)
dlsym_internal(0x7f823a875030, _FSURLBeginResourcePropertyCacheAccess) ==> 0x13223940a
dlsym_internal(0x7f823a875030, _FSURLSetResourcePropertyForKey)
dlsym_internal(0x7f823a875030, _FSURLSetResourcePropertyForKey) ==> 0x132236e00
dlsym_internal(0x7f823a875030, _FSURLEndResourcePropertyCacheAccess)
dlsym_internal(0x7f823a875030, _FSURLEndResourcePropertyCacheAccess) ==> 0x132239517
dyld_image_header_containing_address(0x10b9be832)
dyld_image_header_containing_address(0x10fcc3801)
libc++abi.dylib: terminating with uncaught exception of type NSException

通过react-native run-ios --configuration Release 和通过Xcode(使用Release 配置)构建时都会发生这种情况。调试工作正常。

React-native 版本:0.56 react 版本:16.4.1Xcode 版本 10.1

最佳答案

没关系。我通过修复删除 babel.config.js 并将 .babelrc 文件修复为

解决了这个问题
{
"env": {
"development": {
"presets": ["react-native", "@babel/preset-flow"],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
[
"@babel/plugin-transform-runtime",
{
"helpers": true,
"regenerator": false
}
]
]
},
"production": {
"presets": ["react-native", "@babel/preset-flow"],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
"transform-remove-console"
]
}
}
}

关于iOS 版本构建崩溃 : TypeError: n. 渲染不是一个函数。 (在 'n.render()' 中, 'n.render' 未定义)React Native 0.56,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55930747/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com