How to solve ''React-Native Issue: PCH was compiled with module cache path''

http://blog.csdn.net/jiangbo_phd/article/details/54016242

最近React-Native项目中发现一个奇怪的问题:
当执行:
react-native run-ios


的时候,发生如下错误:
PCH was compiled with module cache path '/Users/tyler/workspace/html5space/HappyTime/ios/build/ModuleCache/HST39TUTS9TS', but the path is currently '/Users/tyler/workspace/webstormspac/react-native-template/ios/build/ModuleCache/HST39TUTS9TS'


react-native AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler


因为这个ios工程我在本地复制粘贴过,也就是说工程位置转移了,之前是没有问题的。在新的工程位置执行命令才发生此问题。
探索一番,找到了解决方案:
首先我们在ios工程目录下找到这个ModuleCache文件夹:
删除ModuleCache文件夹,然后重新执行:
react-native run-ios


即可成功运行,build success!

你可能感兴趣的:(How to solve ''React-Native Issue: PCH was compiled with module cache path'')