Flutter打包iOS过程中pod访问github失败

问题描述

执行Flutter打包iOS命令出现如下错误:

bash 复制代码
# flutter build ios
...
 Error output from CocoaPods:
↳
         Cloning into '/var/folders/q8/sd0qtp6d69b30yt6gsh1jrg40000gq/T/d20231116-58127-8g2zje'...
         fatal: unable to access 'https://github.com/ccgus/fmdb.git/': Failure when receiving data from the peer

    [!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a
    platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install

问题分析

安装失败的原因是网络问题。

解决方案

  1. 开启代理

  2. 配置代理

bash 复制代码
% export https_proxy=http://127.0.0.1:7890 
  1. 重新打包,执行成功。
相关推荐
武玄天宗11 分钟前
第三章、flutter项目启动时有一段时间出现白屏怎么办?
flutter
renke33641 小时前
Flutter 2025 跨平台工程体系:从 iOS/Android 到 Web/Desktop,构建真正“一次编写,全端运行”的产品
android·flutter·ios
QC七哥2 小时前
伪造git提交记录生成点阵字符
git·github
梧桐ty2 小时前
鸿蒙 + Flutter:构建万物互联时代的跨平台应用新范式
flutter·华为·harmonyos
TimberWill3 小时前
GitHub Copilot 一键生成中文commit提示语规则设置
git·github
Zender Han3 小时前
Flutter 中 AbsorbPointer 与 IgnorePointer 的区别与使用场景详解
android·flutter·ios
renke33643 小时前
Flutter 2025 状态管理工程体系:从简单共享到复杂协同,构建可预测、可测试、可维护的状态流架构
flutter·架构
勤劳打代码3 小时前
循序渐进 —— Flutter GetX 状态管理
flutter·面试·前端框架
徐小夕3 小时前
pxcharts 多维表格开源!一款专为开发者和数据分析师打造的轻量化智能表格
前端·架构·github