React Native,AwesomeProject,react-native run-ios:** 构建失败 **
Posted
技术标签:
【中文标题】React Native,AwesomeProject,react-native run-ios:** 构建失败 **【英文标题】:React Native, AwesomeProject, react-native run-ios : ** BUILD FAILED ** 【发布时间】:2016-10-27 22:38:27 【问题描述】:我尝试使用 AwesomeProject 运行我的第一个 React Native... 在“react-native run-ios”之后,我得到了:
** 构建失败 **
以下命令产生了分析器问题:分析 RCTLocationObserver.m(1 个带有分析器问题的命令)
以下构建命令失败:CompileC /Users/nicolasjoly/Devel/AwesomeProject/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m 正常 x86_64 目标-c com.apple.compilers.llvm.clang.1_0.compiler 分析 RCTLocationObserver.m 编译C /Users/nicolasjoly/Devel/AwesomeProject/ios/build/Build/Intermediates/RCTNetwork.build/Debug-iphonesimulator/RCTNetwork.build/Objects-normal/x86_64/RCTNetworkTask.o RCTNetworkTask.m 正常 x86_64 目标-c com.apple.compilers.llvm.clang.1_0.compiler(3次失败)安装 build/Build/Products/Debug-iphonesimulator/AwesomeProject.app 否 设备已启动。打印:条目,“:CFBundleIdentifier”,不 存在 /Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/node_modules/promise/lib/done.js:10 抛出错误; ^
错误:命令失败:/usr/libexec/PlistBuddy -c 打印:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist 打印:条目,“:CFBundleIdentifier”,不存在
at checkExecSyncError (child_process.js:464:13) at Object.execFileSync (child_process.js:484:13) at _runIOS (/Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:82:34) at /Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:24:5 at tryCallTwo (/Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:45:5) at doResolve (/Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:200:13) at new Promise (/Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:66:3) at Array.runIOS (/Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:23:10) at Object.run (/Users/nicolasjoly/Devel/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:88:13) at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
感谢您的帮助!!
【问题讨论】:
你安装了最新版本的xcode吗? 【参考方案1】:尝试运行react-native upgrade
,然后对所有订阅消息说“是”。之后,再次尝试react-native run-ios
【讨论】:
【参考方案2】:首先,运行命令react-native upgrade
。然后,删除您的 ios
和 android
文件夹。然后,运行react-native eject
。然后,运行react-native-git-upgrade
。然后,运行react-native link
。
最后,再次运行react-native run-ios
命令。
【讨论】:
以上是关于React Native,AwesomeProject,react-native run-ios:** 构建失败 **的主要内容,如果未能解决你的问题,请参考以下文章
react native 增加react-native-camera
更新 react-native-maps 以使用 create-react-native-app
react native 增加react-native-storage
React-Native 和 Expo:create-react-native-app 和 react-native init 之间的区别
什么是 react-native-cli 和 @react-native-community/cli?
React Native - 当 react-native 版本 > 0.55 时,无法通过 react-native-cli 创建新项目