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!
Related
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.
output of flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.2, on Linux, locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)
• No issues found!
After i did dart pub upgrade ...i got the following..
output of --stacktrace
I was getting the same error and I tried
flutter clean
and then
dart pub upgrade
for the Dependencies upgrade.
and then it started working you can just click on the Pub Upgrade in Android studio in pubspec.yml file of your projects.
Or you can remove the dependency which is creating issue after upgarde.
The flutter tools aren't launching when I press the button on Android Studio, and I also get a warning when I use flutter run.
I've tried flutter clean, but this still happens on both the terminal and Android Studio flutter plugin.
flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.2, on macOS 11.2.3 20D91 darwin-x64, locale
en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Android Studio
[✓] VS Code (version 1.54.3)
[✓] Connected device (2 available)
• No issues found!
Does anyone have suggestions on how to fix this?
Rebooting my computer fixed it.
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.
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