小言_互联网的博客

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

250人阅读  评论(0)

导读

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

问题

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


  
  1. Warning: CocoaPods minimum required version 1.6. 0 or greater not installed. Skipping pod install.
  2.   CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
  3.   Without CocoaPods, plugins will not work on iOS or macOS.
  4.   For more info, see https: //flutter.dev/platform-plugins
  5. To upgrade:
  6.   sudo gem install cocoapods
  7.   pod setup
  8. Running Xcode build...                                                  
  9.  ├─Assembling Flutter resources...                          17.2s
  10.  └─Compiling, linking and signing...                         1.6s
  11. Xcode build done.                                           22.5s
  12. Failed to build iOS app
  13. Error output from Xcode build:
  14.     ** BUILD FAILED **
  15. Xcode's output:
  16.   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')
  17.     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')
  18.     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')
  19. 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')
  20.     note: Using new build systemnote: Planning buildnote: Constructing build description
  21. Could not build the application for the simulator.
  22. Error launching application on iPhone X.

 

问题分析

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

pod —version 

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

解决方法

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

sudo gem install cocoapods

pod setup

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

$ pod —version 

1.9.1

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

 

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

三掌柜的微信公众号:

三掌柜的新浪微博:

 


转载:https://blog.csdn.net/CC1991_/article/details/116727266
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场