尝试将Flutter添加到iOS应用时,命令PhaseScriptExecution失败,退出代码非零 [英] Command PhaseScriptExecution failed with a nonzero exit code while trying to add Flutter to iOS app
问题描述
我正在尝试向现有应用添加抖动.因此,在进行生产应用之前,我尝试使用全新的Xcode 10 Single View Application.我在 https://github.com/flutter上按照本教程进行操作/flutter/wiki/Add-Flutter-to-existing-apps ,并且在目标的构建阶段添加了运行脚本后卡住了.出现错误:
I am trying to add flutter to the existing app. So before doing on the production app I tried with brand new Xcode 10 Single View Application. I followed the tutorial here on https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps and got stuck after adding the run script in the build phase of my target. It's giving the error:
错误:
iphoneos/AFEiOS.build
export TEMP_ROOT=/Users/dhavalkansara/Library/Developer/Xcode/DerivedData/AFEiOS-gctxucyuhlhesnfkbuxfswkozboo/Build/Intermediates.noindex
export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault
export TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO
export TeamIdentifierPrefix=RQ9BPQCP49.
export UID=501
export UNLOCALIZED_RESOURCES_FOLDER_PATH=AFEiOS.app
export UNSTRIPPED_PRODUCT=NO
export USER=dhavalkansara
export USER_APPS_DIR=/Users/dhavalkansara/Applications
export USER_LIBRARY_DIR=/Users/dhavalkansara/Library
export USE_DYNAMIC_NO_PIC=YES
export USE_HEADERMAP=YES
export USE_HEADER_SYMLINKS=NO
export VALIDATE_PRODUCT=NO
export VALID_ARCHS="arm64 arm64e armv7 armv7s"
export VERBOSE_PBXCP=NO
export VERSIONPLIST_PATH=AFEiOS.app/version.plist
export VERSION_INFO_BUILDER=dhavalkansara
export VERSION_INFO_FILE=AFEiOS_vers.c
export VERSION_INFO_STRING=""@(#)PROGRAM:AFEiOS PROJECT:AFEiOS-""
export WRAPPER_EXTENSION=app
export WRAPPER_NAME=AFEiOS.app
export WRAPPER_SUFFIX=.app
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=10E1001
export XCODE_VERSION_ACTUAL=1020
export XCODE_VERSION_MAJOR=1000
export XCODE_VERSION_MINOR=1020
export XPCSERVICES_FOLDER_PATH=AFEiOS.app/XPCServices
export YACC=yacc
export arch=undefined_arch
export variant=normal
/bin/sh -c /Users/dhavalkansara/Library/Developer/Xcode/DerivedData/AFEiOS-gctxucyuhlhesnfkbuxfswkozboo/Build/Intermediates.noindex/AFEiOS.build/Debug-iphoneos/AFEiOS.build/Script-19DAA30A22C0FB0100A039E2.sh
The path lib/main.dart does not exist
The path does not exist
Command PhaseScriptExecution failed with a nonzero exit code
我在下面尝试过.
我的Pod文件:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'AFEiOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for AFEiOS
target 'AFEiOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'AFEiOSUITests' do
inherit! :search_paths
# Pods for testing
end
flutter_application_path = '/Users/dhavalkansara/FlutterToNative/AFE_flutter/'
eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)
end
- 已经在我的项目中添加了 FLUTTER_ROOT .
请帮助我解决这个问题.
Please help me out with this issue.
推荐答案
这对我有用:xcode 11.3.1.
this works for me: xcode 11.3.1.
xcode->目标->运行器
xcode ->targets->runner
在构建阶段:运行脚本和瘦二进制文件,选择:仅在安装时运行脚本
in build phases: run script and thin binary, select: run script only when installing
这篇关于尝试将Flutter添加到iOS应用时,命令PhaseScriptExecution失败,退出代码非零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!