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. 重新打包,执行成功。
相关推荐
miofly1 小时前
GitHub 今日推荐|DiPlay:让 iPhone CarPlay 直连 BYD 车机,无需硬件适配器
开源·github
行者-全栈开发1 小时前
【前端/JS框架】CVE-2026-3854:GitHub Enterprise Server X-Stat注入XSS漏洞深度剖析与紧急修复指南
前端·javascript·github
怕浪猫3 小时前
2026年9月面18个后端
后端·面试·github
传奇开心果编程5 小时前
【SwiftUI入门练中学】第7课 动画与手势:让界面更灵动
学习·macos·ui·ios·swiftui·swift
恋猫de小郭6 小时前
Android 原生的 Compose A2UI 也来了,你还抱着 XML 养老吗?
android·前端·flutter
掘金017 小时前
Cursor Agent Prompt 拆解
人工智能·程序员·github
知潮网7 小时前
发售刚十天,9999 元的 iPhone 18 Pro 解锁就重启
ios·iphone
樱花落木兰8 小时前
SpringBoot + ECharts 后台数据统计报表模块实战
java·javascript·spring boot·ai·log4j·github·echarts
事圆则缓8 小时前
Flutter 状态管理框架对比(三):Riverpod 如何连起购物车与异步价格
开发语言·javascript·flutter