xxxxxxxxxx
Solution that worked for me:
1. Just install plugins.
Studio>>File>Settings>Plugins>Browse Repositories
2. Search for flutter.
3. Tap on Install (a dialog will pop regarding dart dependency. click Yes).
4. Once the installation is finished restart android studio.
If still not worked
1. flutter channel dev
2. flutter doctor -v
xxxxxxxxxx
For windows
// run on commandline
flutter config --android-studio-dir=C:\Program Files\Android\Android Studio
xxxxxxxxxx
flutter channel dev
flutter upgrade
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
flutter doctor -v
xxxxxxxxxx
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
xxxxxxxxxx
// for android studio 4.2
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.2/plugins ~/Library/Application\ Support/AndroidStudio4.2