React原生编译器iOS构建失败,命令PhaseScriptExecution失败,退出代码为非零

qlckcl4x  于 11个月前  发布在  iOS
关注(0)|答案(1)|浏览(191)

两天来,我一直在尝试运行一个现有的项目,该项目是用Xboxite样板构建的,android版本工作正常,但我无法获得ios版本。首先,有一个与unary_function相关的错误,在修复它之后,我在XCode中遇到了一个新的错误“Command PhaseScriptExecution failed with a nonzero exit code”。

...
address/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'react-native-safe-area-context' from project 'Pods')
    warning: Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
    
    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS Simulator, id:9251DE04-CE06-4D88-95C7-5AABCCF008BE, OS:17.2, name:iPhone 15 Plus }
    { platform:iOS Simulator, id:9251DE04-CE06-4D88-95C7-5AABCCF008BE, OS:17.2, name:iPhone 15 Plus }
    ** BUILD FAILED **
    
    
    The following build commands failed:
            PhaseScriptExecution [CP-User]\ Generate\ app.config\ for\ prebuilt\ Constants.manifest /Users/name/Library/Developer/Xcode/DerivedData/guardian-anwhhkyjhbavobalirikdkvqliqv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/EXConstants.build/Script-46EB2E00024160.sh (in target 'EXConstants' from project 'Pods')
    (1 failure)
    
    info Run CLI with --verbose flag for more details.
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

字符串
我已经尝试了很多关于点燃问题和Stack上的其他问题的建议.但没有一个有效。

XCode: 15.1
react: 18.2.0
react-native: 0.71.7
Node: v18.12.1
yarn: 1.22.19
npm: 9.8.1


没有工作:https://github.com/expo/expo/issues/15809PhaseScriptExecution failed for react-native-config on Xcode build...

dw1jzc5e

dw1jzc5e1#

我更新了所有内容,如nvm rvm节点ruby和......它没有帮助。然后我删除了bash_profile中的注解,它没有帮助,然而,下一次我删除了bash_profile中的所有内容,现在有一个空的bash_profile,现在它可以在iOS上工作。但问题是,现在我运行Android有问题。需要帮助
MacBook M1 Pro
且误差

warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
error Failed to start the app.
Error: spawnSync adb ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at Object.spawnSync (node:child_process:876:24)
    at module.exports.sync (/node_modules/execa/index.js:334:30)
    at tryLaunchAppOnDevice (/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/tryLaunchAppOnDevice.js:46:22)
    at node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:95:39
    at Array.forEach (<anonymous>)
    at runOnAllDevices (/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:90:48)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.handleAction (/node_modules/@react-native-community/cli/build/index.js:108:9)

字符串
好吧,过了一段时间,这对我来说很有效:
我试着将这些行添加到bash_profile中,但没有成功,最后,我在下面添加了一些选定的行,现在我可以同时运行

export ANDROID_HOME=/your path/Library/Android/sdk
export PATH=${PATH}:/your path/Library/Android/sdk/tools
export PATH=${PATH}:/your path/Library/Android/sdk/platform-tools
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

相关问题