尝试将颤振添加到iOS应用程序时,命令PhaseScriptExecution失败,退出代码为非零

尝试将颤振添加到iOS应用程序时,命令PhaseScriptExecution失败,退出代码为非零,ios,swift,xcode,flutter,dart,Ios,Swift,Xcode,Flutter,Dart,我正在尝试添加颤振到现有的应用程序。所以在制作应用程序之前,我尝试了全新的Xcode 10单视图应用程序。我遵循了这里的教程,在我的目标的构建阶段添加了运行脚本后陷入了困境。它给出了一个错误: 错误: iphoneos/AFEiOS.build export TEMP_ROOT=/Users/dhavalkansara/Library/Developer/Xcode/DerivedData/AFEiOS-gctxucyuhlhesnfkbuxfswkozboo/Build/Interme

我正在尝试添加颤振到现有的应用程序。所以在制作应用程序之前,我尝试了全新的Xcode 10单视图应用程序。我遵循了这里的教程,在我的目标的构建阶段添加了运行脚本后陷入了困境。它给出了一个错误:

错误:

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
  • 已经在我的项目中添加了flatter\u ROOT
请帮我解决这个问题。

这对我很有效:
1) 将此添加到您的播客文件:

flutter_application_path = '/Users/dhavalkansara/FlutterToNative/AFE_flutter/'
    eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)

    install_all_flutter_pods(flutter_application_path)
另外,对于每个目标,您可能也需要这样做,即

target 'AFEiOSTests' do
    inherit! :search_paths
    install_all_flutter_pods(flutter_application_path)
    # Pods for testing
  end

  target 'AFEiOSUITests' do
    inherit! :search_paths
    install_all_flutter_pods(flutter_application_path)
    # Pods for testing
  end

2) 运行
pod安装

这对我来说很有用:xcode 11.3.1

xcode->targets->runner


在构建阶段:运行脚本和精简二进制文件,选择:仅在安装时运行脚本谢谢Alexander Lozano,我上传了Xcode 12.0.1版的图像


天哪,我已经花了两天的时间试图解决这个问题,非常感谢。这么做有什么坏处吗?是的,你仍然会使用flift.。\除了开玩笑,我一直在寻找答案,但似乎没有人知道。与此同时,这对我来说不起作用,我的探索还在继续(