flutter升級後 運行項目報錯 Warning: Podfile is out of date

報錯以下:

Warning: Podfile is out of date
  This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/24641 for instructions.
To regenerate the Podfile, run:
  rm ios/Podfile
  警告:Podfile已過時
   這可能會致使將不匹配的Flutter版本嵌入到您的應用中,這可能致使App Store提交被拒絕或崩潰。
   若是您要保留本地Podfile編輯,請參閱https://github.com/flutter/flutter/issues/24641瞭解說明。
要從新生成Podfile,請運行:
   rm ios / Podfile
複製代碼

解決辦法:

大多數狀況是在升級flutter版本後發生的,要解決此問題,請按照如下步驟操做ios

  1. 找到Podfile文件直接刪除,路徑項目名稱/ios/Podfile,或者能夠經過在項目根目錄中運行如下命令來執行此操做
rm ios/Podfile
複製代碼
  1. Run再次項目,會再次建立一個新的或者更新Podfile文件。
相關文章
相關標籤/搜索