13

I am trying to install flutter on ubuntu , android studio flutter and dart plugins have been installed , but flutter doctor said that they are not installed. At the beginning flutter doctor didn't find my android studio and sdk even if they are installed, then fixed this problems by configuring custom directories for android studio and sdk with this commands : flutter config --android-studio-dir=/my/local/path/for/android/studio flutter config --android-sdk=/my/local/path/for/sdk but couldn't find any solution how to show android studio installed plugins directory for flutter doctor

```
[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_US.UTF-8)
    • Flutter version 0.7.3 at /home/zayniddin/flutter
    • Framework revision 3b309bda07 (2 weeks ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /home/zayniddin/Documents/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: /home/zayniddin/Documents/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio
    • Android Studio at /home/zayniddin/Documents/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • android-studio-dir = /home/zayniddin/Documents/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.2)
    • IntelliJ at /snap/intellij-idea-community/77
    • Flutter plugin version 28.0.4
    • Dart plugin version 182.4323.44

[✓] VS Code (version 1.27.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.18.0

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

```

any solutions ?, please help me

4 Answers4

18

change channel master to dev. then upgrade.

flutter channel dev
flutter channel upgrade

try again

flutter doctor

Note: I think it's Android Studio 4.1 issue...

Serdar Polat
  • 3,992
  • 2
  • 12
  • 12
  • 2
    Yeah it is, using the above worked for me. Thanks – ZongoBoyX Dec 06 '20 at 08:28
  • So did this work on the stable branch with earlier versions of Android Studio? – Moberg Jan 03 '21 at 16:28
  • Worked well. It's Android 4.1 issue. – Rafael Pereira Ramos Jan 21 '21 at 03:40
  • 1
    while it was switching to flutter channel 'upgrade' it printed this on my machine: This is not an official channel. For a list of available channels, try "flutter channel". git: fatal: 'origin/upgrade' is not a commit and a branch 'upgrade' cannot be created from it Switching channels failed with error code 128. – alper Feb 10 '21 at 18:04
  • so, this worked, but as I do not really want to live on the _dev_ edge, I switched back to channel `master`. Then ran `flutter doctor` which triggered a download of Dart SDK. So, yes, switching channels worked, but perhaps only because the channel switch triggers the required download? – PeterK Feb 25 '21 at 02:15
9

The problem is with the stable version i guess

step 1 : run> flutter channel dev

step2 : run> flutter channel upgrade

step3 : run > flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"

this worked for me using Android studio version 4.1

Nuqo
  • 3,793
  • 1
  • 25
  • 37
8

This is the Step install the flutter in the Android Studio:

1.Go to Settings->Plugin->Install Flutter and Dart->Restart Android Studio
2.Download  the flutter sdk
3.In the environment Variable->User Variable->
ANDROID_HOME F:\AndroidSDK(Paste your Android SDK Path)
Path:F:\AndroidSDk;(Paste your Android SDK Path)
     c:\ProgramFiles\Java\jdk\1.8.0_20\bin;(Paste your jdk Path)
     c:\Users\Desktop\flutter\bin;(Paste your Flutter SDK Path)
4.Git install at c:\ProgramFiles\Git
5.Open Gitbash
$flutter doctor
$flutter doctor --android-licenses
Accept the licences Y Y Y Y
Make sure your Device should be connected your PC   
Soumen Das
  • 1,292
  • 17
  • 12
1

Have you tried Manjunath's answer?

If that fails, uninstall Android Studio then reinstall it and add the flutter + dart plugins. That worked for me.

olivrg
  • 5,523
  • 3
  • 15
  • 19