Flutter-加入原生,錯誤信息(Command PhaseScriptExecution failed with a nonzero exit code)

問題描述

  • 在原生iOS中加入 fluttermodule,提示以下錯誤:
Command PhaseScriptExecution failed with a nonzero exit code
複製代碼
  • flutter低版本中Podfile.文件是經過如下方式加入到原生工程中,
flutter_application_path = 'path/name/'
eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)
複製代碼

最近flutter更新後,上面的方式運行pod install 提示完成,但實際並無引入包ios

Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.
複製代碼

解決辦法:

  • 修改Podfile文件,內容以下
flutter_application_path = 'path/name/'
  load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'Demo' do
  install_all_flutter_pods(flutter_application_path)
end
複製代碼
  • 執行pod install
相關文章
相關標籤/搜索