CocoaPods 已安装但再次显示错误消息未安装
CocoaPods already installed but display error message not installed once more
我是 flutter 的新手,我买了一台新的 MacBook Pro BigSur 并尝试安装 flutter。
我遇到了 CocoaPods 的问题,我做了所有事情,最后我成功安装了,正如你在我的 flutter doctor 中看到的那样。但是现在的问题是,当我 运行 模拟器时,我得到同样的消息错误,CocoaPods 未安装或无效状态....我不明白这种情况,我现在该怎么办?
请帮帮我....
这里是我的颤振医生..
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.6.2 20G314 darwin-x64, locale
en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.1)
[!] Android Studio
✗ Android Studio not found at
/Applications/android-studio-2021.1.1.20-mac.dmg/Contents
[✓] VS Code (version 1.63.2)
[✓] VS Code (version 1.63.2)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories. ```
Error message :
``` 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.
CocoaPods not installed or not in valid state.```
successfully installation message :
``` Fetching cocoapods-1.11.2.gem
Successfully installed cocoapods-1.11.2
Parsing documentation for cocoapods-1.11.2
Installing ri documentation for cocoapods-1.11.2
Done installing documentation for cocoapods after 2 seconds
1 gem installed. ```
尝试:sudo arch -x86_64 gem 安装 ffi
然后 运行: arch -x86_64 pod install
您还需要更新 iOS 文件夹中的播客文件,取消注释第二行并将“9.0”替换为“10.0”
应该可以。
如果您使用的是 Android Studio,这是用户在刚刚发布的新版“Bumblebee”2021.1.1 中遇到的问题。
https://github.com/flutter/flutter/issues/97251
目前的解决方法是使用如下命令行启动 Android Studio:
open /Applications/Android\ Studio.app
export PATH="/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"
设置最新版本 Ruby 的路径,然后直接从 cmd 打开应用程序 line/terminal 为我修复了它。
open /Applications/Android\ Studio.app
我是 flutter 的新手,我买了一台新的 MacBook Pro BigSur 并尝试安装 flutter。 我遇到了 CocoaPods 的问题,我做了所有事情,最后我成功安装了,正如你在我的 flutter doctor 中看到的那样。但是现在的问题是,当我 运行 模拟器时,我得到同样的消息错误,CocoaPods 未安装或无效状态....我不明白这种情况,我现在该怎么办?
请帮帮我....
这里是我的颤振医生..
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.6.2 20G314 darwin-x64, locale
en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.1)
[!] Android Studio
✗ Android Studio not found at
/Applications/android-studio-2021.1.1.20-mac.dmg/Contents
[✓] VS Code (version 1.63.2)
[✓] VS Code (version 1.63.2)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories. ```
Error message :
``` 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.
CocoaPods not installed or not in valid state.```
successfully installation message :
``` Fetching cocoapods-1.11.2.gem
Successfully installed cocoapods-1.11.2
Parsing documentation for cocoapods-1.11.2
Installing ri documentation for cocoapods-1.11.2
Done installing documentation for cocoapods after 2 seconds
1 gem installed. ```
尝试:sudo arch -x86_64 gem 安装 ffi
然后 运行: arch -x86_64 pod install
您还需要更新 iOS 文件夹中的播客文件,取消注释第二行并将“9.0”替换为“10.0”
应该可以。
如果您使用的是 Android Studio,这是用户在刚刚发布的新版“Bumblebee”2021.1.1 中遇到的问题。
https://github.com/flutter/flutter/issues/97251
目前的解决方法是使用如下命令行启动 Android Studio:
open /Applications/Android\ Studio.app
export PATH="/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"
设置最新版本 Ruby 的路径,然后直接从 cmd 打开应用程序 line/terminal 为我修复了它。
open /Applications/Android\ Studio.app