Where does flutter doctor command look for Android Studio, Visual Studio Code etc. Mine is not detecting VSCode even if I have installed it.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Android Studio (version 3.3)
[✓] Android Studio (version 3.4)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
! Doctor found issues in 2 categories
I don't use Intellij with flutter, so I can simply ignore that warning.
I'm on Manjaro i3 and tried installing both VSCode open source (from Arch Community Repository) and MS branded version (from Arch User Repository) though pacman.
You can add VS Code to your PATH,then it will be solved.
Launch VS Code.
Open the Command Palette (Ctrl+Shift+P) and type 'shell command' to find the Shell Command:
Install 'code' command in PATH command.
Related
I've recently installed android studio 4.1.2 with flutter 1.22.6
even though I installed flutter and dart plugins in android studio the result of 'flutter doctor' command was as follows.
[√] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version
10.0.18362.30], locale en-US)
[√] 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.
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
Now for clear error act as below (Steps worked for me):
flutter channel dev
flutter upgrade
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
flutter doctor -v
It is a problem in Flutter config detection. If you start Android Studio and plugins installed, you can use it and all functionality will works fine. You can find solutions in issue on GitHub.
It's a bug in the Flutter SDK.
You can ignore it. Everything works as intended.
The reason for getting that error is because of the Android version you are using. If you should run:
flutter doctor -v,
You should get the Android version flutter is trying to check the configuration for.
In my case, it shows Android Studio version 4.1.0 even though i have Android Studio 4.1.2 installed with the required plugins. So, as long as it keeps expecting that Android studio version but with a different version installed, you should be getting same error. So, i think the solution to that is to get the Android version flutter doctor displays or probably wait for the next stable release of flutter that supports Android version 4.1.2.
Flutter doctor says that my android license status cannot be found.
[√] Flutter (Channel stable, 1.20.3, on Microsoft Windows [Version 10.0.19041.450], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
[√] Android Studio (version 4.0)
[√] VS Code (version 1.48.2)
[!] Connected device
! No devices available
I did try running flutter doctor --android-licenses
that returned me with the following error
flutter doctor --android-licenses
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
What am I missing here?
I had the same problem.
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (7 days ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale es-ES)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.57.1)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
I have achived the solution on the next way:
1.- Open a terminal window.
2.- Set the environemnt var JAVA_HOME to the path where the jdk 8 ist. in my case is:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
3.- Run the command: flutter doctor --android-licenses
Thesethree steps haven resolved my problem.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale es-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.57.1)
[✓] Connected device (1 available)
• No issues found!
Save the value of your JAVA_HOME environment variable, then remove the JAVA_HOME environment variable if it exists.
Save the value of your jdk path. Remove your jdk from your PATH.
With those changes made, the flutter doctor --android-licenses should work.
If applicable, restore your JAVA_HOME environment variable and jdk in your path.
If that doesn't work, uninstall Android Studio and XCode, download the latest copies and reinstall.
If you can't resolve the issue, look at this thread: https://github.com/flutter/flutter/issues/28230
Hi I am getting the following error.
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version 10.0.18362.1016], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] 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.2)
[√] Connected device (1 available)
! Doctor found issues in 1 category.
I have installed both plugins and everything in environment variable.
I installed Android studio in my custom path, this may be the issue. I have given the current android-studio path using flutter config command.
When I check the Installation path the plugin is not there(flutter and dart). It is installed in C:\Users\AppData\Roaming\Google\AndroidStudio4.1\ path.
So I set that path then shows another error that is, embedded java is not found.
Also I tried copying it to custom path. But no luck.
Thanks for your help
If you are doing everything on vs code having flutter and dart not installed on android studio should not be an issue. You only need android studio to connect to the emulator. I can run my flutter code with both plugins not installed.
I am a new user to flutter and i installed android studio and flutter plug in. While running my flutter doctor -v it shows. I don't know how to fix it. help me out. I tried a lot to fix it but nothing helps me
[✗] 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, set
ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
[✗] 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 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 34.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1248-b01)
[!] Android Studio
• Android Studio at /Users/apple/Developer/flutter/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
✗ Android Studio not found at /Users/apple/Developer/flutter/Contents
• Try updating or re-installing Android Studio.
[!] Connected device
! No devices available
Please go to Project Structure and solve some errors.
Android Studio -> File -> Project Structure.
Please check that you install dart and flutter plugin in the android studio.
Please install Dart in your system also.
is there local.properties file present in your project, inside android folder ?
if not , then create a local.properties file and put your android sdk path inside it, like in my case
sdk.dir=/Users/tusharpandey/Library/Android/sdk
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 6.1.7601], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[!] Android Studio (version 3.4)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.35.1)
!] Connected device
! No devices available
! Doctor found issues in 3 categories.
You have to accept licences agreement from the android SDK
You can type this command sdkmanager --licenses or navigate to your SDK folder and type tools/bin/sdkmanager --licenses.
This will ask you if you want to review non-accepeted licenses. You just have to type y to accept or n if you want to decline.
PS: Don't forget to connect your device and test debug mode with adb devices
Open VS Code, then download Dart and flutter plugin. Don't forget to implement the fix given by #user8773560