目標
flutter導入後に
flutter doctorで出てくるエラーを対処する
※flutter doctorとはflutterでを使う上の開発環境が不足箇所がないぁ診断してくれう便利な機能です。
結論
Androids Studioをダウンロード
Androids Studioのプラグインでflutterをダウンロードする
android licenses statusの設定をする
Xcodeをダウンロード・アップデート
cocoapodsの導入
詳細
ターミナル
flutter doctor
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/setup/#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!] Xcode - develop for iOS and macOS (Xcode 10.3)
✗ CocoaPods not installed.
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
[!] Android Studio (version 3.5)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
解決方法
Android Studio
ダウンロード
flutterのプラグインを入れる
(1)Android Studioを開く
(2)ヘッダー部分の『Android Studio』をクリック
(3)preferenceをクリック
(4)Pluginsをクリック
(5)検索画面でflutterを検索、ダウンロード
android licenses statusの設定
flutter doctor --android-licenses
で全部の質問をyで回答する
xcode
自分の場合、すでにダウンロードされていたのでアップデートのみ行った。
23Gの空き容量(20Gでは容量不足と注意された)がないとアップデートが開始されない。
cocoapodsの導入
→iOSのライブラリを管理してくれるソフトらしい
brew update
brew install cocoapods
pod setup
→home brewがない人はダウンロードしてください