5
5

More than 3 years have passed since last update.

Android StudioにてFlutterプラグインが認識されない

Posted at

はじめに

FlutterのプラグインをAndroid Studioにインストールしているにも関わらず、flutter doctor で認識されない現象に遭遇しました。

バージョン

  • Mac os 10.15.6
  • Android Studio 4.1.1
  • Flutter 1.22.4

解決方法

プラグインパスへのシンボリックリンクを設定することで解決します。
以下、issueコメントが参考になります

When I tested it with Android 3.6 version, it worked.
So, while looking at the 4.0 version, I checked that the plugin path has changed.
If I helped, it's me thank you

参考 : flutter/issues/67986#issuecomment-715187116

プラグインが認識されない状態

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on Mac OS X 10.15.6 19G2021 darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ 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 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.

[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.

ここが該当部分です。
Android Studioはインストール済み、Flutterのプラグインもインストール済みなのにエラーとなっていました。

プラグインのシンボリックリンクを設定

以下のコマンドでシンボリックリンクを設定

$ 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.22.4, on Mac OS X 10.15.6 19G2021 darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ 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 4.1)
[✓] VS Code (version 1.51.1)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

参考

Flutter Doctor: Android Studio 4.1 is not detected

5
5
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
5
5