I have installed flutter correctly on my Ubuntu machine. I have also installed Android Studio and its plugins Flutter and Dart.
Anyway, when I run:
flutter doctor --verbose
I get this output:
[✓] Flutter (Channel stable, 1.20.1, on Linux, locale es_ES.UTF-8)
• Flutter version 1.20.1 at /root/snap/flutter/common/flutter
• Framework revision 2ae34518b8 (hace 5 días), 2020-08-05 19:53:19 -0700
• Engine revision c8e3b94853
• Dart version 2.9.0
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /home/AAAA/Android/Sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /usr/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_265-8u265-b01-0ubuntu2~18.04-b01)
• All Android licenses accepted.
[!] Android Studio (not installed)
• Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup
for detailed instructions).
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
My android studio is located on /snap/android-studio/current/android-studio
I have also tried running:
flutter config --android-studio-dir=/snap/android-studio/current/android-studio
And:
flutter config --android-studio-dir=/snap/android-studio
But the result after running flutter doctor is always the same, nothing recognized.
Thanks!
I installed both flutter and android-studio through snap. This fixed it for me:
flutter config --android-sdk="$HOME/Android/Sdk"
flutter config --android-studio-dir="/snap/android-studio/current/android-studio/"
The flutter config command above also worked for me on Windows, but instead I had to use it with no spaces bewtween equal sign and "Path", like below:
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
it's work for me, macos:
flutter config --android-studio-dir=/Applications/"Android Studio.app"
when flutter doctor not detect android studio ;
then provide path manually by using following command :
flutter config --android-studio-dir ="your-android-path"
for example:
flutter config --android-studio-dir = "C:\Program Files\Android\Android Studio"
it's work for all OS .
thank you...
flutter wasn't detecting android studio till i did this command:
flutter config --android-studio-dir=/media/hacker/code/android/android-studio
instead of this below which did not work
flutter config --android-studio-dir="media/hacker/code/android/android-studio"
Yeah, so find where snap has installed Android-Studio in your ubuntu:
Go to the root directory where you can find etc, opt, var, usr directories.
Search for "Android". For me it was in "/opt/android-studio-2021.2.1/android-studio"
Open the Terminal and enter:
flutter config --android-studio-dir ="your-android-path"
For me it was like:
flutter config --android-studio-dir ="/opt/android-studio-2021.2.1/android-studio"
Then again run:
flutter doctor
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.
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
I am installing Flutter and everything is good except one thing, specified above.
Flutter doctor says this:
$ flutter doctor -v
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.228], locale nl-NL)
• Flutter version 0.7.3 at C:\Flutter\flutter_windows_new\flutter
• Framework revision 3b309bda07 (13 days 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 27.0.3)
• Android SDK at C:\Users\iwijsman\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 27.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] IntelliJ IDEA Community Edition (version 2018.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.2
• Flutter plugin version 28.0.4
• Dart plugin version 182.4323.44
[√] Connected devices (1 available)
• Pixel 2 • FA83P1A01724 • android-arm64 • Android 9 (API 28)
• No issues found!
I've added the requested path to variables and in Android studio, the plugins are installed and applied but I still get this error.
please help me, where am I going wrong?
The same problem faced me, but trying the above solution was not helpful. So I tried another thing:
Open File
Select settings from the File menu
Select Languages & frameworks from the left panel
Select Flutter
Then from the right panel choose the location of your flutter SDK
The location of flutter SDK is where you copied or cloned the code. In my case it was like the following:
If the specified location contains the flutter SDK, the version section will contain your flutter version. If not, the version section will not contain any versions and there will be a message in the bottom of the setting dialog saying:
Flutter SDK Is Not Found In The Specified Location
Hope this helps.
The path to the SDK should be to the main Flutter folder (e.g. C:\src\flutter and not to the bin folder as set in the Environment Variable Path.
As mentioned in the message it is optional and only used for specific tasks.
You can install it from Android Studio
Menu > Tools > SDK Manager > Android SDK (left side of the dialog) > SDK Tools (tab)
Ensure that this line is enabled
With [OK] it should be installed.
create an android project and see everything works fine.
if Gradle sync problem with kotline : File -> Settings -> Kotlin Compiler -> Target JVM Version Changing to 1.8 fixed the issue.
If everything run fine as android project then proced:
File -> Settings ->Languages & frameworks->Flutter.
select flutter sdk path as src\flutter and ok
if step 4 not works then select path src\flutter\bin;
Note:if android 10.0 not work then try it with 9.0;
Flutter folder put on dekstop and try to again to set flutter sdk path
check this also..
https://flutter.dev/docs/get-started/install/windows
You need to correctly specify the path of the Flutter installation. To find the path, run in your command line:
flutter doctor -v
The second line of the output should be the path:
[√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19041.488], locale en-US)
--- THIS LINE CONTAINS THE PATH---
• Flutter version 2.0.6 at C:\src\flutter\flutter_windows_2.0.6-stable\flutter
• Framework revision 1d9032c7e1 (6 days ago), 2021-04-29 17:37:58 -0700
• Engine revision 05e680e202
...
Enter the path into Android Studio.
When I ran flutter doctor it reports that my Android Studio Flutter and Dart plugins are not installed, even though I have the latest installed - and in fact, I can build and deploy a flutter app to a mobile device from Android Studio. I think either my config somewhere isn't correct or flutter doctor has a bug.
When I run flutter doctor -v I get the following:
d:\Dev\Flutter>flutter doctor -v
[√] Flutter (Channel master, v0.5.8-pre.264, on Microsoft Windows [Version 10.0.17134.165], locale en-AU)
• Flutter version 0.5.8-pre.264 at D:\Dev\Flutter\Flutter
• Framework revision b32c77a012 (12 hours ago), 2018-08-07 17:09:14 -0700
• Engine revision 7f083e54fe
• Dart version 2.0.0-dev.69.5.flutter-b04def964c
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at D:\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = D:\Android\sdk
• Java binary at: d:\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio
• Android Studio at d:\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• android-studio-dir = d:\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] Connected devices (1 available)
• HTC PN071 • HT485W903981 • android-arm • Android 5.0.2 (API 21)
• No issues found!
I am running Windows 10 using Android Studio 3.1.4. I have switched flutter git branch to master. I have tried uninstall and reinstall the plugins but no success so far.
Below is my Android Studio plugin screenshot:
Go to
Settings > languages and frameworks > flutter
And then on the sdk path browse the directory where you have downloaded flutter. And check to see if it works
Since you are not using the conventional C: drive. Make sure you do not have another version of android studio installed on your system. This would lead flutter to detect a different version without the flutter plugin.
If there is no duplicate installed, there may just be residual files (ie: a backup).
This is just a guess but I hope this helps :)
Just in case someone else ran into this issue, it turns out that my channel was on 'stable' (1.22.1), switching to 'dev' solved the problem. This is a issue, will certanily been fixed in future 'stable' releases.
enter image description here
in case mine i have both android studio and intellij idea installed on my system so i uninstalled intellij idea that fixed my problem
This isn't an issue. Just ignore it. I also only use vscode and get this "issue". Maybe it would be good changing that issue to a info or warning because it could unsettle new flutter developers.