Android Studio doesn't recognize cocoapods

Viewed 1884

summary

My Android Studio doesn't recognize cocoapods even though it is already installed.

problem

When I run main.dart for iPhone 11 device, it shows this error message:

Launching lib/main.dart on iPhone 11 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:
  sudo gem install cocoapods

CocoaPods not installed or not in valid state.
Error launching application on iPhone 11.

When I select Android (Pixel 3a) as emulator, it can run successfully.

environment

platform

macOS Catalina v10.15.6

flutter version

$ flutter --version
Flutter 1.20.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 216dee60c0 (11 days ago) • 2020-09-01 12:24:47 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2

flutter doctor

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.6 19G2021, locale ja-JP)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.48.2)
[✓] Connected device (1 available)

• No issues found!

gem list cocoapods

$ gem list cocoapods

*** LOCAL GEMS ***

cocoapods (1.8.0)
cocoapods-core (1.9.3, 1.8.0, 1.7.5)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.5.0)
cocoapods-try (1.2.0)

pubspec.yml

name: jinro
description: A new Flutter application.
publish_to:
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  http: ^0.12.2
  flutter_secure_storage: ^3.3.3
  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
    sdk: flutter
flutter:
  uses-material-design: true
1 Answers
Related