LoginSignup
1
0

More than 3 years have passed since last update.

flutterでfirestoreのプラグインを使用できるようにしたらデバッグできなくなった

Last updated at Posted at 2020-09-26

事象

タイトルの通り、flutterでfirestoreのプラグインを使用できるようにしたらデバッグできなくなったのです。。

追加したプラグイン

firebase_corecloud_fire_storeを追加しました。
追加する以前はデバッグできたのになぁ。。

pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  provider: ^4.3.2+2
  firebase_core: ^0.5.0
  cloud_firestore: "^0.14.0+2"

エラー内容

デバッグモードにしたらこんな感じのエラーが出ます
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:
  sudo gem install cocoapods

CocoaPods not installed or not in valid state.

解決方法

ターミナルで以下のコマンドを順に打ちました。

とりあえず一回cocoapodsをアンインストール!

$ sudo gem uninstall -n /usr/local/bin cocoapods

最初に sudo gem uninstall cocoapodsを打ったらpermissionがないって言われたので上記のコマンドを実施しています

次にcocoapodsをインストール!

$ sudo gem install -n /usr/local/bin cocoapods

最後に初期設定!

$ pod setup

上記の手順でデバッグできるようになりました!
んーー何故プラグイン入れたらこのようなことになったのかはわからないです。。

とりあえずこれでflutter開発再開できてハッピーです☀️

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0