Kasun Hasanga
Kasun Hasanga

Reputation: 1945

Update to Android Studio 4.1 ,flutter plugin and dart plugin not Installed

I have got a similar question like this. But this problem occurred after updating Android Studio to version 4.1 from version 4.0.

using flutter flutter doctor -v

enter image description here

Upvotes: 29

Views: 33115

Answers (13)

Zaenury Adhiim
Zaenury Adhiim

Reputation: 185

Checkout Flutter channel stable to channel dev and you're good to go.

Copy and paste this in your cmd:

flutter channel dev
flutter upgrade

If you get the error when checkout flutter channel, that's mean you have any changes on flutter SDK. So, go to path of Flutter SDK directory, and open it to your editor, my flutter SDK: C:\src\flutter . How to find the path of Flutter SDK? Run flutter doctor -v, The first line will show the install path. Add any new or modified files by git add . Or git stash to ignore the changes. You can checkout to another channel now

Before enter image description here

After enter image description here

Upvotes: 3

ARHAM RUMI
ARHAM RUMI

Reputation: 543

I was having the same problem. Just follow the given steps to solve it

  1. Make sure DART and FLUTTER Plugins are successfully installed in ANDROID STUDIO

  2. Try restarting ANDROID STUDIO

  3. If still get the same error, then run the following commands to upgrade Flutter version to beta, as this version (1.22.6 stable) is constantly throwing the same error maybe you can call it a bug in the release. Copy them both and paste it in the CMD(run as ADMINISTRATOR)

    flutter channel dev

    flutter upgrade

This worked for me

Upvotes: 1

Syed Usama Ahmad
Syed Usama Ahmad

Reputation: 1335

hello everyone I had the same issue and non of the above answers fixed so I went to the flutter official GitHub and found the answer there here is the link and you have to follow all these steps.

https://github.com/flutter/flutter/issues/67986

flutter upgrade

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

for mac you can do the following as answered by Andrew

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

flutter doctor -v

then if the issue still persistes then just shift to the beta channel and the upgrade flutter then it will fix it.

flutter channel beta

flutter upgrade

you can enable flutter web as an optional steps

https://flutter.dev/docs/get-started/web

Upvotes: 0

Manav Garg
Manav Garg

Reputation: 49

Try the following:

  • Open Android Studio
  • Go to Preference -> Plugins
  • Search for Flutter plugin and install flutter plugin

It will install all the dependent plugins like the dart plugin etc.

Run "flutter doctor -v" and you will see that the issue is resolved.

enter image description here

Upvotes: 3

Sunil Kumar
Sunil Kumar

Reputation: 137

first enter to terminal : flutter channel dev

second enter to terminal : flutter upgrade

it is working fine once download new version of flutter

Latitude-3400:~$ flutter channel dev

  ╔════════════════════════════════════════════════════════════════════════════╗
  ║ A new version of Flutter is available!                                     ║
  ║                                                                            ║
  ║ To update to the latest version, run "flutter upgrade".                    ║
  ╚════════════════════════════════════════════════════════════════════════════╝


Switching to flutter channel 'dev'...
git: From https://github.com/flutter/flutter
git:  + be9bc8cb39...022b333a08 beta   git: Branch 'dev' set up to track remote branch 'dev' from 'origin'.
Successfully switched to flutter channel 'dev'.
To ensure that you're on the latest build from this channel, run 'flutter
upgrade'
sunil@sunil-Latitude-3400:~$ flutter upgrade
Downloading Dart SDK from Flutter engine 20caf549695193a9920ca37752eca4f141bbef31...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed               -> origin/beta  (forced update)

Upvotes: 3

BrProgrammer
BrProgrammer

Reputation: 31

The solution in Windows is quite simple, you just have to open AS and go to the 'Android SDK' part, then to 'SDK Tools'. Activate 'Show Package Details' and from there select 30.0.0 let it download and it works

Upvotes: 1

MARU
MARU

Reputation: 471

I solve this problem like this

Only for MacOS

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

Upvotes: 37

Piotr Karzełek
Piotr Karzełek

Reputation: 25

I had the same problem. What helped me:

  1. removing the old IDE configuration directory:

    rm -r .AndroidStudio4.0/
    
  2. let flutter know where Android Studio is installed, for example

    flutter config --android-studio-dir="/home/piotr/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6858069"
    
  3. switch to dev channel:

    flutter channel dev && flutter upgrade
    

Upvotes: 2

gtxtreme
gtxtreme

Reputation: 3606

This issue has happened due to the change in the configuration (config) directories in Android Studio version 4.1

You can read about it here

TLDR: Just copy the old files to the new directory and you're good to go

How I managed to fix it :

  1. On initial run , Android Studio 4.1 gives a popup to delete unused directories. DON'T DELETE IT . Press OK and proceed.Setup as usual

  2. Now go the directory where your old Android Studio files were present (Find them below)

    Windows: C:\Users\YourUserName\AppData\Roaming\AndroidStudioVersion

    Linux: ~/.config/AndroidStudioVersion

    macOS: ~/Library/Application Support/AndroidStudioVersion

  3. Keeping Android Studio open, Open your file manager and transfer all the old directories and files found in the directory specified in Step 2 above to the new config directory structure (Find them below)

Windows:C:\Users\YourUserName\AppData\Roaming\Google\AndroidStudio4.1

Linux: ~/.config/Google/AndroidStudio4.1

macOS: ~/Library/Application Support/Google/AndroidStudio4.1

4.That's it. Switch to Android Studio and there should be a popup below to update to the latest versions of all plugins respectively

Upvotes: 1

Jamilu Salisu
Jamilu Salisu

Reputation: 327

Switch from Flutter 1.22.2 channel stable to channel dev and you're good to go.

Copy and paste this in your cmd:

flutter channel dev

flutter upgrade

Upvotes: 19

Kira Nofans
Kira Nofans

Reputation: 186

Update the Android Studio to the latest version, then try to update the flutter version and build.gradle version

Upvotes: 1

dotKingfall
dotKingfall

Reputation: 61

As said above, it is just a time-being issue. You can change channels by running flutter channel dev. To know available channels you can run flutter channel

Upvotes: 6

Rafael Bartz
Rafael Bartz

Reputation: 328

It is a flutter issue on 1.22 version, and happens after upgrading to Android Studio 4.1. It was already fixed on 1.23 version (dev channel). You can continue to run and work on your projects normally until this fix isn't ported to stable channel, or you can swith to dev channel and call flutter upgrade.

Upvotes: 11

Related Questions