Flutterのセットアップで起きた Flutter requires a minimum Xcode version of 11.0.0. と plugin not installed;

## 問題について

バージョンを下げてみるもののダメだったのでちゃんとググって対応しました

```
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.3, on Mac OS X 10.14.6 18G103, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Xcode - develop for iOS and macOS (Xcode 10.1)
    ✗ Flutter requires a minimum Xcode version of 11.0.0.
      Download the latest version or update via the Mac App Store.
    ! CocoaPods 1.7.5 out of date (1.8.0 is recommended).
        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 upgrade:
        sudo gem install cocoapods
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.51.1)
[!] Connected device
    ! No devices available
! Doctor found issues in 3 categories.
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.14.6 18G103, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Xcode - develop for iOS and macOS (Xcode 10.1)
    ✗ Flutter requires a minimum Xcode version of 11.0.0.
      Download the latest version or update via the Mac App Store.
    ! CocoaPods 1.7.5 out of date (1.8.0 is recommended).
        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 upgrade:
        sudo gem install cocoapods
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.51.1)
[!] Connected device
    ! No devices available
! Doctor found issues in 3 categories.
```

Flutterは管理しやすいので嬉しいですねえ（Unityのくせで管理雑ですが汗

![スクリーンショット 2020-11-27 14.13.42.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/82601/723660c2-3920-999b-cbb3-80a20d18b886.png)


## 解決方法

### `Flutter requires a minimum Xcode version of 11.0.0.`

[More Downloads for Apple Developers](https://developer.apple.com/download/more/)でXcode11.xをダウンロードするもののmacOS自体をアップグレードしないとダメですね。

<blockquote class="twitter-tweet"><p lang="ja" dir="ltr">やっぱダメかあ😩 <a href="https://t.co/jpTEhQOCgW">pic.twitter.com/jpTEhQOCgW</a></p>&mdash; gremito #ものラジ QAスクラムでCSM® フリーランス (@grem_ito) <a href="https://twitter.com/grem_ito/status/1332190258537000962?ref_src=twsrc%5Etfw">November 27, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>


### `plugin not installed;`

ググったところ[Android Studio Dart And Flutter Plugin is not installed](https://stackoverflow.com/questions/64369971/android-studio-dart-and-flutter-plugin-is-not-installed)を見つけて調べるものの本家のデグレみたいですね。

> Android Studio 4.1 apparently [changed its default plugin install path.](https://github.com/flutter/flutter/issues/69514#issuecomment-720029228)

確認してお告げどおりやってみると確かに `plugin not installed;` が無くなった

```
$ ls -lta ~/Library/Application\ Support/Google/AndroidStudio4.1/
total 16
drwxr-xr-x  26 gremito  staff  832 11 27 13:49 options
-rw-r--r--   1 gremito  staff    4 11 27 13:47 port
drwxr-xr-x  13 gremito  staff  416 11 27 13:47 .
drwxr-xr-x  11 gremito  staff  352 11 27 13:19 plugins
-rw-r--r--   1 gremito  staff    0 11 27 13:18 disabled_update.txt
-rw-r--r--   1 gremito  staff    0 11 19 10:53 disabled_plugins.txt
drwxr-xr-x   3 gremito  staff   96 11  2 15:53 workspace
drwxr-xr-x   3 gremito  staff   96 11  2 15:50 terminal
drwxr-xr-x   3 gremito  staff   96 11  2 15:50 codestyles
drwxr-xr-x  24 gremito  staff  768 11  2 15:50 tasks
-rw-r--r--   1 gremito  staff    0 11  2 15:50 port.lock
drwx------   8 gremito  staff  256 11  2 15:50 ..
-rw-r--r--   1 gremito  staff   38  8  4  2019 user.token

$ ls -lta ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins
total 13384
-rw-r--r--   1 gremito  staff       40 11 27 13:48 availables.xml.etag
-rw-r--r--   1 gremito  staff  5464446 11 27 13:48 availables.xml
-rw-r--r--   1 gremito  staff       34 11 27 13:48 pluginsXMLIds.json.etag
-rw-r--r--   1 gremito  staff   165806 11 27 13:48 pluginsXMLIds.json
drwxr-xr-x  13 gremito  staff      416 11 27 13:47 ..
drwxr-xr-x   4 gremito  staff      128 11 27 13:19 Kotlin
drwxr-xr-x  11 gremito  staff      352 11 27 13:19 .
drwxr-xr-x   6 gremito  staff      192 11 27 13:18 meta
drwxr-xr-x   3 gremito  staff       96 11 19 10:49 Dart
drwxr-xr-x   3 gremito  staff       96 11 19 10:48 flutter-intellij
-rw-r--r--   1 gremito  staff   333182 11  2 15:52 extensions.xml

$ ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.14.6 18G103, locale ja-JP)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Xcode - develop for iOS and macOS (Xcode 10.1)
    ✗ Flutter requires a minimum Xcode version of 11.0.0.
      Download the latest version or update via the Mac App Store.
    ! CocoaPods 1.7.5 out of date (1.8.0 is recommended).
        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 upgrade:
        sudo gem install cocoapods
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.51.1)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.
```