Flutter CocoaPods 报错

报错如下

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 see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. Exception: CocoaPods not installed or not in valid state

提示是 CocoaPods not installed.

  • 执行 pod 可以的~
  • 执行
flutter run  
  • 报错 CDN timeout
....
CDN: trunk URL couldn't be downloaded:https://cdn.jsdelivr.net/cocoa/Specs/c/0/4/Flutter/1.0.0/Flutter.podspec.json timeout
....

其实 xcode 是可以执行的 就是CDN超时

  • 还是墙的问题
  • 直接删除 trunk
    rm -rf  ~/.cocoapods/repos/trunk             
   git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git  ~/.cocoapods/repos/trunk 
    pod setup
   cd $project/macos
   flutter run
posted @ 2023-11-13 15:34  vx_guanchaoguo0  阅读(193)  评论(0编辑  收藏  举报