So I ran flutter doctor and it says that Android studio is missing.
I install Android Studio, run flutter doctor again, but it doesn't detect android studio and still displays the same message.
Why is flutter doctor not detecting it?
Is there a tool to fix the tool that fixes flutter? Like flutter doctor doctor for example?
try this: flutter doctor -vv
-v, --verbose Noisy logging, including all shell commands
executed.
If used with "--help", shows hidden options. If used
with "flutter doctor", shows additional diagnostic
information. (Use "-vv" to force verbose logging in
those cases.)
If you have installed Android Studio properly by following the steps listed in this doc, then just try to restart your Terminal or PC.
If it doesn't show after this, then there is no need to worry as still, you should be able to build and debug Flutter Android apps without the Android Studio being detected.
After installing AndroidStudio install tools and plugins, if you still face any issue, do a restart.
Also, you can follow install guide
Does it solve in your case?
After installing Android Studio, you have to install Flutter SDK and add it to the path in Windows environment variables, and also before all this, it is better to install JDK8 (not 11 not 16 just 8).
Once you have done all that I said, you can restart your terminal or CMD in windows and now run the flutter doctor
and for details on that you should run flutter doctor -v
Link for download flutter SDK : https://flutter.dev/docs/get-started/install
Link for download JDK 8 : https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
Related
I'm having a problem accepting the Android Licenses. I've looked for well over a month for a solve and haven't found one yet. My username on my mac contains the word (Deleted) with a space before it and I'm wondering if that's causing any problems.
I run $ flutter doctor and get this result:
I run $ flutter doctor --android-licenses
And I get this error:
Error: Could not find or load main class (Deleted).Library.Android.sdk.cmdline-tools.latest
I have all the SDK tools installed and updated to the latest. What I have installed is pictured below:
I have Java 8 installed and running, as well. Not getting any errors with Java.
Could use another pair of eyes to see what I'm doing wrong.
Here is my flutter doctor -v output:
First set android sdk path by flutter config --android-sdk <path-to-your-android-sdk-path>
and run flutter doctor --android-licenses again
I have started with the setup of flutter updated version and am a total beginner in this platform. This is the error I have been getting. Could you please help me?
You have to install Android SDK Command-line Tools (in SDK Manager).
After Installing, accept the android licensces (in CMD)
flutter doctor --android-licenses
Either install Android Studio to get the required dependecies or download an android sdkmanager and check its path (path/to/sdkmanager should be the path to that).
To avoid any problems for beginners, I would just install Android Studio here, set it up until it installs the android sdk, then switch to Flutter: that was the only way to fix this since some time ago if I remember correctly
Please first run this command
flutter doctor --android-licenses
then follow this link : Android/Sdk is missing a Tools folder, meaing no sdkmanager, meaning "Android license status unknown" error
I just updated Flutter plugin to 53.0.1, restarted Android Studio and hit "run" button and the error below show up:
Could not find an option named "devtools-server-address".
Close and reopen AndroidStudio resolved for me!
killall java
I downgraded from Flutter 2.0 to Flutter 1.22.5 and got this error.
To solve it,
Go to your terminal and write flutter channel stable.
Then run flutter doctor.
Now you may get another error like this -
If you have Flutter & Dart plugins already install, just ignore this error. This is a bug in Flutter 1.22.5 .
Just run the app and it will work fine!
I had the same issue but using VS Code on stable channel
Execute the following commands:
flutter channel stable
flutter upgrade
flutter clean
flutter pub get
Then, close and open your IDE
Follow the steps:
File -> Invalidate Cache and Restart. Run flutter clean Worked For me.
This so simple... Open terminal type flutter channel dev this solve your problem.
And after that flutter upgrade
Finally, flutter doctor
If it does not help:
Open terminal type flutter channel stable
And after that flutter upgrade
Finally, flutter doctor
Working without upgrading flutter
Safe fix for Mac (Android Studio 4.1+). It is in a different directory now, but the symbolic link helps.
Just run this command in the Terminal:
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
Change the version of the Android studio depending on what you have, I had 4.2 so used.
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.2/plugins ~/Library/Application\ Support/AndroidStudio4.2
Just Invalidate Cache and Restart. Worked for me.
Just close your all project and also close Android Studio and Reopen.
I've been trying to solve this error since one day.
First I got this error
Exception: Android sdkmanager tool not found (/ usr / lib / android-sdk / tools / bin / sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.io/setup/#android-setup for detailed instructions.
Here is a Screenshot
I tried to solve this error but couldn't solve it and I deleted Android Studio completely (sdk, gradle, .android ... etc). I reinstalled and flutter I got this error when I wrote doctor. New errors Screenshot
C:\Users\Fatihh>flutter doctor --android-licenses
Warning: File C:\Users\Fatihh\.android\repositories.cfg could not be loaded.
4 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)?
C:\Users\Fatihh>
Finally I made the decision to write here. I need help.
Android studio version:4.1.1
OS :Win 10
Flutter SDK :1.22.5
Android SDK:30.3
First, open Android Studio and install Flutter and Dart plugins on it.
Then run the command flutter doctor --android-licenses
Finally, clean your project, make sure packages are installed and run it
flutter clean
flutter pub get
flutter run
Here is my Flutter doctor summary:
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v1.10.13-pre.12, on Microsoft Windows [Version 10.0.17134.1006], locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.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/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.5)
[√] Connected device (1 available)
! Doctor found issues in 1 category.
C:\Users\user>
I have already updated My SDK manager to the latest version
My SDK version is 29.0.2
How can I resolve this error... This error appears even after updating SDK manager
Screenshot of SDK Location:
It works for me, Here are the steps that solve my problem:
STEP 1:ANDROID LICENSES --android-licenses, will resolve most cases
Since you are here you have reached "Android License Status Unknown" issue for Android tool chain, as many suggested try flutter doctor --android-licenses. If you are good with all the config. It should ask for an yes and press y and Voila. But if it shows:
Android sdkmanager tool not found (C\Users\__\local\Android\sdk\tools\bin\sdkmanager). Go to step two
STEP 2: SDK Manager installation from Android Studio
Open your Android Studio , File-> settings->System settings(left tab) ->Android SDK, go to SDK Tool section in that page, untick hide obsolete packages, select Android SDL tools(obsolete) and press apply.
It will install the SDK and you confirm it by going and checking if this path exists(C\Users\__\local\Android\sdk\tools\bin\sdkmanager)
STEP 3: Repeat 1
Repeat step 1 after installation in a new command line check if its working , else go to STEP 4
STEP 4: sdkmanager --update
It will ask you update the sdk, just run the command given in terminal
C\Users\__\local\Android\sdk\tools\bin\sdkmanager --update.
If it is running, then its cool. let it finish and repeat step 1, else if it is throwing some exceptions like java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema etc,
It means your java is not installed or not the correct version. Go to next step
STEP 5: JAVA 8.1 and JAVA_HOME path.
Install JAVA 8.1 and set JAVA_HOME path. Make sure it is version 8.1(register free account and download from oracle the 8.1 version, remember above 11+ wont work for Flutter
NOTE: by yaniv maymon: if you already have Java installed on your computer and the sdkmanager --update still not working. go the environment variable and update the "JAVA_HOME" path to jdk folder. then exit the command prompt, open it again and run the update command –
STEP 6: Final Step
After installing and setting up path properly, run the C\Users\__\local\Android\sdk\tools\bin\sdkmanager --update command in new terminal and it will work
STEP 7: Rerun flutter doctor, You can see it saying to run the command flutter doctor --android-licenses . so run flutter doctor --android-licenses in terminal and press y when asked
Resources
It could be that your path is not set correctly? Have you looked in Settings>Appearance and Behavior>System Settings>Android SDK>Android SDK Location?
I had the same problem and solve it installing the latest java version Java 8. Then setting JAVA_HOME Variable. In Windows: Environment Variables> System Variables> add a new or edit your JAVA_HOME> in the Variable Value field, enter your JDK or JRE installation path the JAVA_HOME. After this, the command flutter doctor --android-licenses worked.
According to this issue in the flutter repository it seems like you have not accepted all the SDK license agreements.
You can resolve it by running
flutter doctor --android-licenses
in you terminal and accepting the outstanding licenses by pressing y and return.
I had the same problem
You can resolve this issue by running this command
flutter doctor --android-licenses
into your flutter_console.bat
Or
uninstall the android studio and reinstall it, it will fix the issue.
Add env variable ANDROID_SDK_ROOT as the path where the sdk was installed to.
This solved the problem for me:
open Android Studio and open SDK Manager then SDK Tools tab. check
the box "Android SDK Command-line Tools
Open the command prompt and type flutter doctor --android-licenses then press enter
It is going to ask you to type 'Y' for each license. type 'y' until all the licenses are done.
now check with flutter doctor again in the command prompt and it should tell you that license is accepted.
What worked for me was to delete the Android 30 file in the following directory:
C:\Users\user\AppData\Local\Android\Sdk\platform
After that, I went to File > Settings > System Settings > SDK platforms.
Then I checked the Android 11.0® option, and finally clicked Apply.
Installing Android SDK command line tools in SDKs tools on Android studio worked for me
Open Android Studio and open SDK Manager then SDK Tools tab.
Check the box Android SDK Command-line Tools
After installing Android SDK command line tools in the tools SDKs of Android Studio, execute the command flutter doctor --android-licenses