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版本

Flutter开发:Warning: CocoaPods minimum required version 1.6.0 or greater not installed…的解决方法_第1张图片

解决方法

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

sudo gem install cocoapods

pod setup

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

$ pod —version 

1.9.1

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

 

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

三掌柜的微信公众号:

Flutter开发:Warning: CocoaPods minimum required version 1.6.0 or greater not installed…的解决方法_第2张图片

三掌柜的新浪微博:

Flutter开发:Warning: CocoaPods minimum required version 1.6.0 or greater not installed…的解决方法_第3张图片

 

你可能感兴趣的:(Flutter开发,flutter)