颤振警告:CocoaPods已安装,但已损坏.跳过吊舱安装- Mac Book M1



我已经用M1芯片的Mac Book挣扎了8个月了,现在真的需要找到一个解决方案。Cocopods行不通

Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

到目前为止我所做的:重新安装Coco Pods,从命令行启动IDE并重新安装Pods。见这里:CocoaPods未安装或未处于有效状态我不认为这与我的Android Studio版本有关。

which pod

/usr/地方/bin/pod

扑动医生-v

[✓] Flutter (Channel stable, 2.10.5, on macOS 11.5.1 20G80 darwin-arm, locale en-ES)
• Flutter version 2.10.5 at /Users/timknogel/FlutterDev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5464c5bac7 (8 days ago), 2022-04-18 09:55:37 -0700
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/timknogel/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.66.0)
• VS Code at /Users/timknogel/Desktop/Visual Studio Code.app/Contents
• Flutter extension version 3.38.1
[✓] Connected device (2 available)
• iPhone 13 (mobile) • 3253AB15-FB90-45F5-93CD-5A95FC029075 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
• Chrome (web)       • chrome                               • web-javascript • Google Chrome 100.0.4896.127
[✓] HTTP Host Availability
• All required HTTP hosts are available

有人能帮忙吗?

非常感谢!

这是怎么回事:CocoaPods未安装或未处于有效状态类似的错误。

on my case:

  1. 切换到最好的ruby版本:rvm --default use 3.1.2
  2. sudo gem install cocoapods
  3. brew install cocoapods
  4. pod repo update
  5. 启动IDE

祝你好运!

按以下步骤操作:

  1. sudo gem install activesupport -v 6.1.7.6

  2. sudo gem install cocoapods

  3. cd ios

  4. pod install

我使用rbenv设置全局ruby版本。或rvm,因为某些原因,flutter默认使用系统ruby,这与我在。zshrc文件中设置的不同。这导致cocoapods的版本不匹配。

最新更新