首页 > 解决方案 > 更新到 Xcode 12 后无法在模拟器上运行 React Native Project

问题描述

我刚刚更新到 Xcode 12,现在我的 react native 项目(在更新之前正在工作)将无法运行并输出此错误

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
info Launching "app.lfgo.release"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=4):
The request to open "app.lfgo.release" failed.
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
    The operation couldn’t be completed. Application info provider (FBSApplicationLibrary) returned nil for "app.lfgo.release"
    Application info provider (FBSApplicationLibrary) returned nil for "app.lfgo.release"

标签: reactjsxcodereact-native

解决方案


升级到 Xcode 12 时我也遇到了同样的情况。帮助的是(如果使用锁定文件)将 @react-native-community/cli-platform-ios 安装为 devDep 并将@react-native-community/cli-platform-iosyarn.lock 文件中所有条目中的版本升级到 4.13 .0


推荐阅读