在 xcode 更新到 8.0 后,React Native run-ios 构建失败. [英] React Native run-ios build fail after xcode update to 8.0.
问题描述
好的,我已经在这个 React Native 项目上工作了几个星期,没有任何问题.我最近更新到 xCode 8.0 并且 RN 构建失败.当我执行react-native run-ios"时,它返回BUILD FAILED"错误.我通过 xCode 尝试过它,它返回类似的东西.我试着环顾四周,但似乎找不到解决方案.我敢肯定,这可能是 xcode 中的某些设置发生了变化,这将一切搞砸了.
Okay so I've been working on this React Native project for a few weeks now without any issue. I recently updated to xCode 8.0 and RN build is failing. When I do "react-native run-ios", it returns a "BUILD FAILED" error. I tried it through xCode and it returns something similar. I tried looking around but I can't seem to find a solution to this. I'm sure it's probably some setting that changed within xcode that's messing it all up.
通过终端运行
> ** BUILD FAILED **
>
>
> The following build commands failed: CompileC
> /Users/macuser/Documents/FreeLance/theHaps/DaHAPS/ReactApp/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o
> RCTSRWebSocket.m normal x86_64 objective-c
> com.apple.compilers.llvm.clang.1_0.compiler (1 failure)
> /Users/macuser/Documents/FreeLance/theHaps/DaHAPS/ReactApp/node_modules/promise/lib/done.js:10
> throw err;
> ^
>
> Error: xcodebuild process exited with code 65
> at ChildProcess.<anonymous> (runIOS.js:102:14)
> at emitTwo (events.js:100:13)
> at ChildProcess.emit (events.js:185:7)
> at maybeClose (internal/child_process.js:850:16)
> at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
通过 xcode 运行:
谢谢!
推荐答案
第一步:
- 进入你的 RN 项目文件夹并打开 ios > .xcodeproj
- 这将在 xcode 中打开项目.
第 2 步:
- 运行文件,一旦构建失败,它会在左侧显示错误.双击RCTWebSocket",它会打开一个包含更多设置的新窗口/选项卡.
第 3 步:
- 找到Apple LLVM 8.0 - 自定义编译器标志"
- 在它下面你会看到其他警告标志"——现在应该有两个标志.单击并删除两个标志.
清洁&重新运行您的项目,它应该可以正常工作.
Clean & Rerun your project and it should work like normal.
这篇关于在 xcode 更新到 8.0 后,React Native run-ios 构建失败.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!