前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Flutter Warning: CocoaPods not installed. Skipping pod install.

Flutter Warning: CocoaPods not installed. Skipping pod install.

作者头像
yechaoa
发布2022-06-10 14:24:51
1.8K0
发布2022-06-10 14:24:51
举报
文章被收录于专栏:移动开发专栏

报错

flutter项目在运行到ios 模拟器的时候报错:

代码语言:javascript
复制
Warning: CocoaPods not installed. Skipping pod install.

还有

代码语言:javascript
复制
Using new build systemnote: Planning buildnote: Constructing build descripti....
代码语言:javascript
复制
Xcode’s output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
Debug.xcconfig line 1: Unable to find included file "Pods/Target Support
Files/Pods-Runner/Pods-Runner.debug.xcconfig"
Debug.xcconfig line 1: Unable to find included file “Pods/Target Support
Files/Pods-Runner/Pods-Runner.debug.xcconfig”
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Could not build the application for the simulator.
Error launching application on iPhone XR.

具体报错没记录,一开始也没想着会有这么麻烦。

提示

官方给出了两个提示执行命令:

代码语言:javascript
复制
brew install cocoapods
pod setup

这个其实在一开始配环境执行flutter doctor的结果之后也给了提示,也是配置mac环境的条件。 但是本来项目是可以运行到ios模拟器的,新项目也是可以运行的,但是最近项目改动较多,无从查起,没办法只能硬着头皮解决了。

在网上搜了一圈,并没有相关的解决方案,没办法,站不了巨人的肩上了,只能自己摸索了。

思路一

按照指示在终端执行brew install cocoapods,等了好一会,开始出现下载

代码语言:javascript
复制
==> Downloading https://homebrew.bintray.com/bottles/cocoapods-1.7.5.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/5a/5a70fd60007975ce224824b1a8852ba9124faa6753061d0ecc024be4cebd6e8b?__gda__=exp=1565624237~hmac=b87d5d0111b49f600da053951890

下载到百分之几的时候就失败了,然后又重试,结果在百分之六十多的时候又失败了,应该是要fq,国内速度较慢。

然后又开始在网上搜CocoaPods的安装教程,搜了一圈下来,看着都麻烦。

思路二

然后我尝试在Android Studio自带的terminal中直接执行brew install cocoapods,默认是在项目根目录执行的,

代码语言:javascript
复制
yechaodeMacBook-Pro:wanandroid_flutter yechao$ brew install cocoapods

会有error提示

代码语言:javascript
复制
Error: Another active Homebrew update process is already in progress.
Please wait for it to finish or terminate it to continue.

但是可以下载,而且速度挺快的,

代码语言:javascript
复制
==> Downloading https://homebrew.bintray.com/bottles/cocoapods-1.7.5.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/5a/5a70fd60007975ce224824b1a8852ba9124faa6753061d0ecc024be4cebd6e8b?__gda__=exp=1565624237~hmac=b87d5d0111b49f600da053951890
######################################################################## 100.0%

下载完成之后在执行 pod setup,又是一顿下载,这个要等一会了。

代码语言:javascript
复制
yechaodeMacBook-Pro:wanandroid_flutter yechao$ pod setup
Setting up CocoaPods master repo
  $ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git --progress -- master
  Cloning into 'master'...
  remote: Enumerating objects: 260, done.        
  remote: Counting objects: 100% (260/260), done.        
  remote: Compressing objects: 100% (249/249), done.        
  Receiving objects:  10% (361304/3368611), 72.04 MiB | 57.00 KiB/s  

完了之后再次尝试运行到ios模拟器,

ok,运行成功!

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-08-13,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 报错
  • 提示
  • 思路一
  • 思路二
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档