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 提示完成,但实际并没有引入包

 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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容