flutter開發(fā)CocoaPods版本過低

flutter doctor -v 出現(xiàn)

Xcode - develop for iOS and macOS (Xcode 13.2.1)
    ? Xcode at /Applications/Xcode.app/Contents/Developer
    ? Build 13C100
    ! CocoaPods 1.10.1 out of date (1.11.0 is recommended).
        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 see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods 版本已過時。Flutter 推薦使用 1.11.0 版本。CocoaPods 用于檢索 iOS 和 macOS 平臺的插件代碼,確保 Dart 側(cè)的插件正常工作。沒有 CocoaPods,插件將無法在 iOS 或 macOS 上運行。

請按照以下步驟升級 CocoaPods:

1、打開終端。
2、輸入以下命令以更新您的 CocoaPods 安裝:

 gem install cocoapods

這將安裝最新版本的 CocoaPods。如果您收到權(quán)限相關(guān)的錯誤,可以嘗試在命令前加上 sudo:

sudo gem install cocoapods

3、完成更新后,運行以下命令以驗證已安裝的 CocoaPods 版本:
您應(yīng)該看到版本號為 1.11.0 或更高。
4、再次運行 flutter doctor -v 以檢查問題是否已解決。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容