【问题标题】:react-native build failed (run-ios)react-native 构建失败(run-ios)
【发布时间】:2019-03-20 01:27:07
【问题描述】:

我尝试使用本地代码从 CRNA 传递到 React-Native 应用程序。当我使用 react-native run-ios 构建时,构建失败,我不知道该怎么办!

** 构建失败 **

以下构建命令失败:

CompileC /Users/Karl/Documents/Applications/MyItems51Work/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/raw_logging.o /Users/Karl/Documents/Applications/MyItems51Work/node_modules/react-native/third-party/glog-0.3.4/src/raw_logging.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

(1 次失败)

安装 build/Build/Products/Debug-iphonesimulator/MyItems.app 处理命令时遇到错误(域=NSPOSIXErrorDomain,代码=22): 未能安装请求的应用程序 无法确定应用程序的捆绑标识符。 确保应用程序的 Info.plist 包含 CFBundleIdentifier 的值。 打印:条目,“:CFBundleIdentifier”,不存在

命令失败:/usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/MyItems.app/Info.plist 打印:条目,“:CFBundleIdentifier”,不存在

【问题讨论】:

  • 你有需要链接的 npm 模块吗?
  • 不知道,如何查看模块是否需要链接?
  • react-native-image-picker,需要链接吗?
  • 是的,它确实需要根据文档npmjs.com/package/react-native-image-picker进行链接

标签: react-native


【解决方案1】:

链接问题通常具有误导性,并且不容易调试:

this question 有很好的做法来避免此类问题。

【讨论】: