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. 重新打包,执行成功。
相关推荐
ITfeib10 分钟前
Flutter
开发语言·javascript·flutter
杂雾无尘2 小时前
开发者必看:如何在 iOS 应用中完美实现动态自定义字体!
ios·swift·apple
小蜜蜂嗡嗡2 小时前
flutter更改第三方库pub get的缓存目录;更改.gradle文件夹存放目录
flutter
小皮侠2 小时前
nginx的使用
java·运维·服务器·前端·git·nginx·github
汪汪队睡大觉753 小时前
OpenAI-Kotlin文档详解
github
蛋黄蛋黄3 小时前
微信表情怎么在自己的项目使用微信表情?-> [开源仓库]wechat-emoji
前端·github
HalukiSan3 小时前
如何提交PR
git·gitlab·github
某非著名程序员4 小时前
Flutter 新手绕不过的坑:ListView 为啥顶部老有空白?
flutter·客户端
掘金安东尼4 小时前
前端周刊第421期(2025年7月1日–7月6日)
前端·面试·github