解决Flutter运行IOS报错:Podfile is out of date

问题描述

Flutter项目很久没有在IOS上跑过了,突然想在ios上运行一下,结果出来以下提示。

Warning: Podfile is out of date
  This can cause issues if your application depends on plugins that do not support iOS or macOS.
  See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.
To regenerate the Podfile, run:

  rm ios/Podfile

Error launching application on iPhone 12 Pro Max.

解决方案

根据提示,Podfile中一些依赖过期了。删除Podfile文件,再次运行会自动生成最新的podfile.

myMacBook-Pro:pic-editor ado$ rm ios/Podfile

运行后,耐心等待build完成。

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           203.4s
Debug service listening on ws://127.0.0.1:52091/8oreY9SFHj0=/ws
Syncing files to device iPhone 12 Pro Max...

猜你喜欢

转载自blog.csdn.net/adojayfan/article/details/122105053
今日推荐