Flutter: Error running pod install解决
- 发表于
- flutter
错误信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
Launching lib/main.dart on iPhone 11 Pro Max in debug mode... Running pod install... CocoaPods' output: ↳ Preparing Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Fetching external sources ……这里省略一堆信息,重点在开头和结尾的Error…… Error output from CocoaPods: ↳ Cloning into '/var/folders/p_/np5btv6969b2nsyfp68q7_y00000gn/T/d20200218-35172-i852j9'... fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out Error running pod install Error launching application on iPhone 11 Pro Max. |
这是由于被墙了无法克隆导致的,解决方法提供两个:
一、直接使用代理并全局
二、修改git地址为可访问镜像库
1、进入 libwebp
目录下
1 |
cd ~/.cocoapods/repos/trunk/Specs/1/9/2/libwebp/ |
2、找到最新版本,如上图 1.1.0
并进入
1 |
cd 1.1.0 |
3、编辑 libwebp.podspec.json
1 |
vim libwebp.podspec.json |
4、修改 git 仓库地址
1 2 3 4 |
"source": { "git": "https://chromium.googlesource.com/webm/libwebp", "tag": "v1.1.0" } |
修改成:
1 2 3 4 |
"source": { "git": "https://github.com/webmproject/libwebp.git", "tag": "v1.1.0" } |
改完重试下,应该好了!
原文连接:Flutter: Error running pod install解决
所有媒体,可在保留署名、
原文连接
的情况下转载,若非则不得使用我方内容。