whenever the flutter doctor always makes this mistake he says he can't find the file - flutter

Output of flutter doctor
C:\WINDOWS\system32>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.0, on Microsoft Windows [versão 10.0.18363.778], locale pt-BR)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
X Android SDK file not found: C:\Users\egacg\AppData\Local\Android\sdk\platforms\android-29\android.jar.
[√] Android Studio (version 3.6)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.

You need to download the SDK (Android SDK version 29.0.3).
If you are using android studio you can click on Tools->SDK Manager, Select the version you need and hit apply/OK.
Then run flutter doctor again.

Related

Flutter doctor error -cmdline tools component missing and Android sdkmanager tool not found. Windows

I'm trying to setup an android emulator but I don't have intel. I've been through so many similar pages but none have given me an answer on why I can't get my flutter doctor to work. Here is my flutter doctor results:
C:\Users\icetr>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.19044.1645], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.4)
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.66.2)
[√] Connected device (3 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category.
C:\Users\icetr>flutter doctor --android-licenses
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to
resolve this.
Here is my android sdk folder:
And my cmdline tools folder:
Inside the lastest folder:
Inside the bin folder:
Here's my paths:
Here's my Android Studio SDK Tools tab:
If anyone needs anymore information just ask.
Install NDK Manager and android command-line tool from android Studio. Also, accept the android licenses.
flutter doctor --android-licenses
After ALOT of trial an error, I had to finally delete all my android packages, Uninstaller Android Studio, and reinstall. Then I deleted all my paths, and reput them in and it fixed it all.

Having trouble installing Flutter

I was trying to install Flutter on my VS Code but I kept running into this issue. Android license status unknown.
(base) Lenovo-Legion:~/Documents/$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.6, on Linux, locale en_GB.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] VS Code (version 1.55.2)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
(base) Lenovo-Legion:~/Documents/$ 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:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
(base) Lenovo-Legion:~/Documents/$
I went back to Android Studio and updated all the SDK licenses as well. No help. How can I fix it?
This was fixed by going to Android studio> Settings > Appearance & Behavior > System Settings > Android SDK > SDK Tools and checking the option to download the Android SDK Command-line Tools (latest).
Android SDK Command Line Tools
Then reboot VS Code and re-run flutter doctor --android-licenses and enter y to accept all licenses. Should work like a charm now!
(base) Lenovo-Legion:~/Documents/$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.6, on Linux, locale en_GB.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] VS Code (version 1.55.2)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
(base) Lenovo-Legion:~/Documents/$ flutter doctor --android-licenses
5 of 6 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)? y
1/5: License android-googletv-license:
---------------------------------------
Terms and Conditions
This is the Google TV Add-on for the Android Software Development Kit License Agreement.
......
......
......
......
Check
(base) Lenovo-Legion:~/Documents/$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.6, on Linux, locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] VS Code (version 1.55.2)
[✓] Connected device (1 available)
• No issues found!

Flutter doctor android-studio-dir problem

When I run flutter doctor, it renders these 2 errors and I can't find a way to get over them:
C:\Users\Work pc>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [version 10.0.19041.928], locale fr-CH)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
X Cannot execute C:\ProgramData\Oracle\Java\javapath\java.exe to determine the version
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[!] Android Studio
X android-studio-dir = C:\Program
X Android Studio not found at C:\Program
[√] VS Code (version 1.55.2)
[√] Connected device (2 available)
! Doctor found issues in 2 categories.
I mainly have difficulties with solving the second problem, related to android studio.
Thanks a lot!
try running this command on your terminal flutter config --android-studio-dir=[path/to/android-studio]
Try running this command in your cmd
flutter config --android-studio-dir=""
Then restart all your editors for them to load new settings

Error Creating new Flutter App with AndrodX

I'm trying to create a Flutter app with Android-X
following this this INFORMATION,
the date is quite recent,
so I'm assuming they are up to date.
The problem is when I run on flutter console
flutter create -a kotlin -i swift --androidx my-app-name
I get this error:
Could not find an option named "androidx".
(running: flutter create blablabla everything works fine)
[edit: this is my flutter doctor]
Doctor summary (to see all details, run flutter doctor -v): [√]
Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows
[Version 10.0.17763.557], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK
version 28.0.3) [√] Android Studio (version 3.3) [√] VS Code (version
1.35.1) [√] Connected device (1 available)
• No issues found!
Did I miss something?

Unable to locate a development device; please run 'flutter doctor' for information about installing additional components

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 6.1.7601], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
X Android SDK file not found: C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\28.0.3\aapt.
[√] Android Studio (version 3.2)
[√] Connected devices (1 available)
! Doctor found issues in 1 category.
configure your sdk path
flutter config --android-sdk /path/to/android/sdk
after that accept all the licenses
flutter doctor --android-licenses
finally run
flutter doctor
In Android Studio open
Menu > Tools > SDK Manger
switch to tab "SDK Tools" and check "Android SDK Build-Tools"
click the OK button.
problems are slow
I just go on C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\28.0.3
AND ADD aapt file.
and run command flutter doctor