React native 反应本机iOS应用程序生成失败-打印:条目“0”:CbundleIdentifier“标识器”;,不存在

React native 反应本机iOS应用程序生成失败-打印:条目“0”:CbundleIdentifier“标识器”;,不存在,react-native,React Native,我正在本地Mac OS X El Capitan机器上运行react本机应用程序。我已经安装了所需的依赖项,但应用程序仍然没有在iOS模拟器中启动 以下是输出: ** BUILD FAILED ** The following build commands failed: Ld build/Build/Products/Debug-iphonesimulator/F8v2.app/F8v2 normal x86_64 (1 failure) Installing build/Buil

我正在本地Mac OS X El Capitan机器上运行react本机应用程序。我已经安装了所需的依赖项,但应用程序仍然没有在iOS模拟器中启动

以下是输出:

** BUILD FAILED **


The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/F8v2.app/F8v2 normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/F8v2.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/done.js:10
      throw err;
      ^

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/F8v2.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:464:13)
    at Object.execFileSync (child_process.js:484:13)
    at _runIOS (/Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:82:32)
    at /Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:24:5
    at tryCallTwo (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:45:5)
    at doResolve (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:200:13)
    at new Promise (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:66:3)
    at Array.runIOS (/Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:23:10)
    at Object.run (/Users/-/f8app/node_modules/react-native/local-cli/cliEntry.js:96:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
**生成失败**
以下生成命令失败:
Ld build/build/Products/Debug iphonesimulator/F8v2.app/F8v2 normal x86_64
(1次失败)
安装build/build/Products/Debug iphonesimulator/F8v2.app
处理命令时遇到错误(domain=NSPOSIXErrorDomain,code=22):
未能安装请求的应用程序
无法确定应用程序的包标识符。
确保应用程序的Info.plist包含CbundleIdentifier的值。
打印:条目“:CbundleIdentifier”不存在
/Users/-/f8app/node_modules/react native/node_modules/promise/lib/done.js:10
犯错误;
^
错误:命令失败:/usr/libexec/PlistBuddy-c打印:CFBundleIdentifier build/build/Products/Debug iphonesimulator/F8v2.app/Info.plist
打印:条目“:CbundleIdentifier”不存在
在checkExecSyncError(child_process.js:464:13)
在Object.execFileSync(child_process.js:484:13)
运行时(/Users/-/f8app/node\u modules/react native/local cli/runIOS/runIOS.js:82:32)
at/Users/-/f8app/node_modules/react native/local cli/runIOS/runIOS.js:24:5
在tryCallTwo(/Users/-/f8app/node_modules/react native/node_modules/promise/lib/core.js:45:5)
在doResolve(/Users/-/f8app/node_modules/react native/node_modules/promise/lib/core.js:200:13)
在新承诺中(/Users/-/f8app/node_modules/react native/node_modules/Promise/lib/core.js:66:3)
在Array.runIOS(/Users/-/f8app/node_modules/react native/local cli/runIOS/runIOS.js:23:10)
在Object.run(/Users/-/f8app/node_modules/react native/local cli/cliEntry.js:96:13)
反对。(/usr/local/lib/node_modules/react native cli/index.js:88:7)

运行
响应本机升级
并覆盖所有iOS文件。那是为了我

我的问题是
build/info.plist
的目录路径中有一个空格。
删除父文件夹名称中的空间解决了此问题。

您是否尝试清理和重建项目?您是否运行了
cd ios&&pod install
并打开了.xcworkspace文件?这里讨论了相同的问题,关于如何修复,我有多种不同的想法:-对我有效的方法是运行
react native upgrade
,以获得最新的PBX项目文件更改。唯一的解决方案是将所有更改分散在Internet上。如果我不想更改react native版本,该怎么办?还有别的办法吗?