收集报错问题
一. TransformError: Unexpected token错误
这与babel-preset-react-native模块有关。尝试运行, yarn remove babel-preset-react-native yarn add babel-preset-react-native@2.1.0 或者如果您使用NPM, npm uninstall babel-preset-react-native npm install babel-preset-react-native@2.1.0
二. Expected a component class got object
标签大写
三. 项目提示含有export NODE_BINARY=node ../node_modules/react-native/scripts/react-native-xcode.sh
在XCode中打开项目 • 导航 Build Phases > Bundle React Native code and images • 更改export NODE_BINARY=node ../node_modules/react-native/packager/react-native-xcode.sh
这是 React Native 4.7以上版本问题
第三方依赖库百度盘链接: 下下来后请放置到 ~/.rncache
运行Xcode ../node_modules/react-native/scripts/react-native-xcode.sh: No such file or directory 项目->Build Phases-> Bundle React Native code and images 这里的都删除删除~
四. library not found for -lstdc++.6.0.9
原因Xcode删除了lstdc++.6.0.9。
解决办法
查找关联了 -lstdc++.6.0.9 的库 一个个排查。 有就直接更新最新库吧,我这边是AMap2DMap这个库。
第三方库没有更新的网上说可以去旧的Xcode9中将-lstdc++.6.0.9 放在Xcode10里,但是我试了,没用呀。
还是老老实实更新吧。
终端输入
pod update AMap2DMap
如图查看哪些第三方存在 -lstdc++.6.0.9