【问题标题】:Provide a valid path to the desired application bundle. Print: Entry, ":CFBundleIdentifier", Does Not Exist提供所需应用程序包的有效路径。打印:条目,“:CFBundleIdentifier”,不存在
【发布时间】:2017-04-29 06:00:00
【问题描述】:
react-native-cli: 1.0.0
react-native: 0.39.2

我克隆了一个 react native 项目。然后我运行npm install,然后运行react-native run-ios。该项目因以下错误而失败。

请不要让项目在 xcode 中运行良好。

有什么想法吗?

以下命令产生了分析器问题:

Analyze RCTLocationObserver.m

(1 个带有分析器问题的命令)

以下构建命令失败: CompileC /Users/jordanmc/Documents/src/Safetypin%20React-Native/ios/build/Build/Intermediates/RCTLinking.build/Debug-iphonesimulator/RCTLinking.build/Objects-normal/x86_64/RCTLinkingManager.o RCTLinkingManager.m 正常 x86_64目标-c com.apple.compilers.llvm.clang.1_0.compiler CompileC /Users/jordanmc/Documents/src/Safetypin%20React-Native/ios/build/Build/Intermediates/RCTGeolocation.build/Debug-iphonesimulator/RCTGeolocation.build/Objects-normal/x86_64/RCTLocationObserver.o RCTLocationObserver.m 正常 x86_64目标-c com.apple.compilers.llvm.clang.1_0.compiler CompileC /Users/jordanmc/Documents/src/Safetypin%20React-Native/ios/build/Build/Intermediates/RCTText.build/Debug-iphonesimulator/RCTText.build/Objects-normal/x86_64/RCTTextManager.o RCTTextManager.m normal x86_64目标-c com.apple.compilers.llvm.clang.1_0.compiler (3 次失败)

安装 build/Build/Products/Debug-iphonesimulator/Safetypin.app 处理命令时遇到错误(域=NSPOSIXErrorDomain,代码=2): 未能安装请求的应用程序 在提供的路径中找不到应用程序包。 提供所需应用程序包的有效路径。 打印:条目,“:CFBundleIdentifier”,不存在

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

【问题讨论】:

    标签: react-native


    【解决方案1】:

    所以,乔丹也遇到了同样的问题。 react-native run-ios 在 ./ios/build 文件夹中创建 Products & Intermediates 文件夹,但问题是有效路径指向 ./ios/build/Build。我一直在做的是通过发出以下命令在 ./ios/build 中手动创建 Build/ 文件夹:

    cd ./ios/build
    mkdir Build
    cd Build
    

    然后,我对文件夹进行符号链接:

    ln -s ../Products .
    ln -s ../Intermediates .
    

    您应该可以让react-native run-ios 再次工作。

    【讨论】:

    • 这是一个不幸但必要的“hack”。我通过在 XCode 中进行自定义工作区设置来解决它。在 XCode 9 中,转到 File -> Workspace Settings -> 单击 Advanced -> 选择 Relative to Workspace 并在每个路径前面加上 build/Build/...
    • 在我的项目中,build 目录已经存在于 iOS/build 中,我该怎么办?
    猜你喜欢
    • 1970-01-01
    • 2016-09-24
    • 2019-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多