flutter 警告:未安装CocoaPods,Android Studio中出现跳过Pod安装错误

ebdffaop  于 2023-03-19  发布在  Flutter
关注(0)|答案(1)|浏览(302)

我试图运行我的应用程序,我得到的错误CocoaPods未安装。跳过吊舱安装。当我运行应用程序在终端使用'flutter运行'它的工作完美。我不知道为什么它不工作在Android工作室。
请查找以下错误。

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
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.
Error launching application on iPhone 12 Pro Max.

扑动医生,我也没有发现任何问题。

flutter doctor -v
[✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-arm, locale en-GB)
    • Flutter version 3.0.4 at /opt/homebrew/Caskroom/flutter/2.5.0/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 85684f9300 (2 weeks ago), 2022-06-30 13:22:47 -0700
    • Engine revision 6ba2af10bb
    • Dart version 2.17.5
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/elamparithibalakrishnan/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.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.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 2020.3)
    • 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.10+0-b96-7249189)

[✓] Connected device (3 available)
    • iPhone 12 Pro Max (mobile) • 0C7D4F63-17B1-4E66-8277-767ED0672937 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-5
      (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 103.0.5060.114
    ! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

在这个问题上,谁能帮帮我?
先谢了。

1l5u6lss

1l5u6lss1#

步骤1:打开VsCode终端或Android Studio终端。
步骤2:sudo gem安装cocopods
步骤3:Flutter清洁
步骤4:Flutter运行

相关问题