Android Studio, Flutter Doctor, Plugins not installed - flutter

I;ve had this problem for months.
Android Studio 3.2 ( newest version )
Flutter 0.8.2 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 5ab9e70727 (4 weeks ago) • 2018-09-07 12:33:05 -0700
Engine • revision 58a1894a1c
Tools • Dart 2.1.0-dev.3.1.flutter-760a9690c2
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2018.1)
[✓] VS Code (version 1.27.2)
[✓] Connected devices (2 available)
Observe that Android Studio has teo plugin issues...
These plugins are installed and I can still compile for iOS and ANDROID using Flutter. But still looking for a solution on OSx

You can just install the Flutter and Dart plugin in Android Studio by following these steps:
Start Android Studio.
Open plugin preferences (Preferences > Plugins on macOS, File >
Settings > Plugins on Windows & Linux).
Select Browse repositories, select the Flutter plugin and click
Install.
Click Yes when prompted to install the Dart plugin.
Click Restart when prompted.
Now run Android Studio.
Run flutter doctor. You should get this output:

The solution is pretty simple. you have to install the Dart plugin in the android studio.
on Mac:
open Android studio.
Preferences.
plugins.
Browse Repositories.
search for dart and install it.
search for flutter and install it.
restart android studio for changes to take place. Now run flutter doctor and your issue will be resolved.
on Windows and Linux:
The path is File>Settings>Plugins and then the rest of the steps are same as above.

Related

Android SDK cannot be found

When I run flutter doctor, this is what is says:
[✓] Flutter (Channel stable, 3.3.6, on macOS 12.1 21C52 darwin-arm, locale
en-CN)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup
for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.71.1)
[✓] VS Code (version 1.72.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
! Doctor found issues in 1 category.
I have downloaded android 12 from android studio, so I don't know what could be causing this problem. I didn't download it to a custom location, it is just sitting in my applications.
I tried looking for an answer on StackOverflow and online, but their problem is different from mine.
Use this code in the terminal: flutter config --android-sdk
For use the path where is your Android SDK located. In most cases it is "C:\Users\yourSystemUsername\AppData\Local\Android\Sdk"
First, find the location of your android SDK. If you cant, download again to custom location using SDK Manager from Android Studio.
My location looks like C:\src\Android\SDK
Now run the following command-> flutter config --android-sdk "sdk-location"
In my case, flutter config --android-sdk "C:\src\Android\SDK"
Your sdk file should look something like this

Android studio is not installed when using flutter doctor

I am running flutter doctor command. But it is saying android studio is not installed many times. I tried flutter config --android-studio-dir=/home/khamidjon/.android, and many more paths I tried to show but to no luck.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Chrome - develop for the web
[!] Android Studio
✗ android-studio-dir = /home/khamidjon/.android
✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Community Edition (version 2020.3)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
My question is what location should be shown for PATH in flutter config --android-studio-dir='PATH'?
For Android Studio installed with Flatpak, i found this config to work:
flutter config --android-studio-dir=/path/to/home/.local/share/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio
Where path/to/home is the path to your home directory.
(Ubuntu 21.10/Pop!_OS)
Snap packages are installed under /snap/appname/ with subdirectories for each new version. Try this to reslove the issue, it worked for me.
flutter config --android-studio-dir="/snap/android-studio/current/android-studio"
The current directory will make sure that it always points to the latest version.
if you have Androind Studio installed in your home directory /home/khamidjon set up PATH like this: /home/khamidjon/android-studio/bin
to append variable in Linux use command
export PATH=$PATH:/some/new/path
to check your PATH use
echo $PATH
In my case snap packages can retain old versions of the program. So inside /snap/android-studio There were 2 versions of android studio inside directories /snap/android-studio/99 and /snap/android-studio/100. So I showed one of these paths: directory /snap/android-studio/100/android-studio with latest version.
So I ran:
flutter config --android-studio-dir=/snap/android-studio/100/android-studio
flutter doctor
Result:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] IntelliJ IDEA Community Edition (version 2020.3)
[✓] Connected device (2 available)
• No issues found!
In windows
if your Android Studio install by default, you can use this command
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
after this command, flutter can found android studio, but the plugin can't...
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version 10.0.18363.1016], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.48.0)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
In Linux (Ubuntu)
Note: for those who are facing the problem in Ubuntu and Android Studio is installed with snap:
flutter config --android-studio-dir="/snap/android-studio/current/android-studio"
Note: for those who are facing the problem in Ubuntu and Android Studio is installed with JetBrains Toolbox:
flutter config --android-studio-dir=/home/myuser/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882
Where ./201.7042822 matches the current version of Android Studio installed. You'll have to check which one you have and update it in the command above.

How to fix Flutter doctor android studio plugin(Dart , Flutter) issue?

I installed the latest version of the Android Studio(4.1.1), the latest version of Flutter (Flutter 1.22.4 • channel stable). I installed the Dart & Flutter plugin in Android Studio. But the flutter doctor gives the plug-in is not installed issue.
Here is flutter doctor command result:
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.16299.19], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
I set the android studio config path
flutter config --android-studio dir="C:\Program Files\Android\Android Studio"
But the result is the same.
flutter upgrade
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
flutter doctor -v
then if the issue still persists then just shift to the beta channel and the upgrade flutter then it will fix it.
flutter channel stable
flutter upgrade
Run the above commands in terminal.
(Android toolchain) issue: you need to install android studio, if already installed, you need to restart your system and then RUN the following on command prompt
flutter doctor --android-licenses
and you will need to accept all terms and conditions.
(Android Studio) issue: you need to set the following:
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio\"

Flutter run -d all Won't start chrome

flutter run -d all will start the application on android and iOS Simulators but won't start chrome.
Any Ideas?
Here is my flutter doctor output if that matters:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.12.13+hotfix.6, on Mac OS X 10.15.1 19B88, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
✗ Android Studio not found at /Applications/Android/Contents
[!] IntelliJ IDEA Community Edition (version 2019.2.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.36.1)
[✓] Connected device (4 available)
! Doctor found issues in 2 categories.
I think this is intended behavior, the same way that if you type flutter run -d all when no other device than Chrome and the web server are available, it outputs No devices found. I guess it's because the web support is still experimental. The only way is flutter run -d chrome.

flutter on mac desktop "No devices detected"

I have run:
export ENABLE_FLUTTER_DESKTOP=true
flutter channel master
flutter upgrade
Then on flutter doctor i get no devices available:
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.10.15-pre.357, on Mac OS X 10.14.6 18G103, locale en-IL)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.4)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Community Edition (version 2019.1.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.39.2)
[!] Connected device
! No devices available
! Doctor found issues in 4 categories.
Did I miss anything? (I'm looking to develop a desktop app so not android emulator / ios emulator)
Whatever instructions you are following are out of date; ENABLE_FLUTTER_DESKTOP hasn't been the supported or documented way to enable experimental desktop support for several months (and the legacy code for it was recently removed). You need to enable it with flutter config as documented in the official instructions
Just Enable flutter desktop
flutter config --enable-macos-desktop