解决Android Studio中Flutter点击run出现CocoaPods not installed. Skipping pod install.

本文探讨了在Android Studio中运行Flutter项目遇到的CocoaPods缺失问题,介绍了通过Xcode和flutter run ios解决方法,以及升级Android Studio版本作为临时解决方案。还提到了手动设置CocoaPods的方法。
摘要由CSDN通过智能技术生成

问题场景

在Android Studio中运行Flutter项目,设备为IPhone,点击Run后,编译出现以下错误

Warning: CocoaPods 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 install:
  sudo gem install cocoapods

CocoaPods not installed or not in valid state.

解决方法

方法1

发现通过在Xcode中打开ios目录运行正常,或者使用flutter run ios也能正常编译。
怀疑是Android Studio没有正确识别CocoaPods。

目前我使用的是Android Studio Arctic Fox,将版本升级到Android Studio Bumblebee,再次使用run运行到ios就能正常使用了。

方法2

如果方法1无效,那我们需要手动设置。

pod setup
brew link --overwrite cocoapods
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值