写点什么

Flutter 开发:Warning:CocoaPods minimum required version 1.6.0 or greater not installed…的解决方法

用户头像
三掌柜
关注
发布于: 2021 年 05 月 20 日
Flutter开发:Warning:CocoaPods minimum required version 1.6.0 or greater not installed…的解决方法

导读

在 Flutter 开发编译运行模拟器的时候,遇到提示电脑当前 CocoaPods 版本低,需要升级到大于等于 1.6.0 版本以上的提示。


问题

编译运行项目的时候,终端打印如下提示内容:

Warning: CocoaPods minimum required version 1.6.0 or greater not installed. Skipping pod install.
  CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
  Without CocoaPods, plugins will not work on iOS or macOS.
  For more info, see https://flutter.dev/platform-plugins
To upgrade:
  sudo gem install cocoapods
  pod setup
Running Xcode build...                                                  
 ├─Assembling Flutter resources...                          17.2s
 └─Compiling, linking and signing...                         1.6s
Xcode build done.                                           22.5s
Failed to build iOS app
Error output from Xcode build:

    ** BUILD FAILED **
Xcode's output:

 error: /Users/Project/app_flutter/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner')
    error: /Users/Project/app_flutter/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner')
    error: /Users/Project/app_flutter/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner')
warning: Capabilities for Runner may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the build settings editor. (in target 'Runner')
    note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone X.
复制代码


问题分析

首先查看一下本机安装的 pod 是什么版本,打开 Mac 电脑自带终端,输入命令行:

pod —version 


查看当前 pod 版本为 1.4.0,确实低于运行项目要求的 1.6.0 版本


解决方法

根据上面分析,需要对 CocoaPods 进行升级操作,分别执行升级命令如下所示:

sudo gem install cocoapodspod setup
复制代码


然后更新完 CocoaPods 之后,查看 CocoaPods 的版本为

$ pod —version 
1.9.1
复制代码



最后再运行项目,就没有上述错误提示了,问题解决!


以上就是本章全部内容,欢迎关注三掌柜的微信公众号“程序猿 by 三掌柜”,三掌柜的新浪微博“三掌柜 666”,欢迎关注!


三掌柜的微信公众号:


三掌柜的新浪微博:


发布于: 2021 年 05 月 20 日阅读数: 18
用户头像

三掌柜

关注

某某某技术有限责任公司架构师 2021.02.05 加入

一分耕耘,不一定有一分收获,但十分耕耘,一定会有一分收获!

评论 (1 条评论)

发布
用户头像
5月日更打卡第十二天
2021 年 05 月 20 日 00:31
回复
没有更多了
Flutter开发:Warning:CocoaPods minimum required version 1.6.0 or greater not installed…的解决方法