xcode IOS 构建警告:转换缓存已重置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46453023/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
IOS build warning: the transform cache was reset
提问by LYu
I am getting this build warning from my React Native project in Xcode
我从 Xcode 中的 React Native 项目收到此构建警告
warning: the transform cache was reset.
warning: the transform cache was reset.
Hope someone can help me get rid of it!
希望有人能帮我摆脱它!
Thanks in advance.
提前致谢。
回答by jarora
I was getting a similar warning when running the react native?bundling script located at node_modules/react-native/scripts/react-native-xcode.sh. I had to remove this line
在运行位于 node_modules/react-native/scripts/react-native-xcode.sh 的 react native?bundling 脚本时,我收到了类似的警告。我不得不删除这一行
--reset-cache \
to get rid of the error.
摆脱错误。
回答by David Conde
Well I'm late to this party but might as well contribute with what happened to me. I've been having this issue for the last few days and the message the transform cache was reset
was not the actual problem. It is a warning after all. The real issue in my case was that node was running out of memory. There is one quick way to patch it but chances is you'll have to trim down on packages.
好吧,我参加这个聚会迟到了,但不妨对发生在我身上的事情有所贡献。过去几天我一直遇到这个问题,但该消息the transform cache was reset
并不是真正的问题。毕竟是警告。就我而言,真正的问题是节点内存不足。有一种快速的方法可以修补它,但很有可能您必须减少软件包。
For the patch go on Build Phases > Bundle React Native code and images
对于补丁继续 Build Phases > Bundle React Native code and images
Change
改变
export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh
To
到
export NODE_BINARY=node
export NODE_OPTIONS="--max_old_space_size=4096"
../node_modules/react-native/scripts/react-native-xcode.sh
Again, this is just a patch, so chances is if you're having this problem there's a reason why node is running out of memory.
同样,这只是一个补丁,所以如果您遇到这个问题,可能是节点内存不足的原因。
回答by phatmann
Invoke the React Native bundling script in a Run Script build phase as follows:
在运行脚本构建阶段调用 React Native 捆绑脚本,如下所示:
../../node_modules/react-native/scripts/react-native-xcode.sh | sed 's/warning: //'
This will remove the word "warning:" from the output.
这将从输出中删除“警告:”一词。