Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Android license status unknown" error on Flutter 1.12 with Android Studio 3.6 #51712

Closed
vicentetfreitas opened this issue Feb 29, 2020 · 47 comments
Assignees
Labels
c: regression It was better in the past than it is now customer: crowd Affects or could affect many people, though not necessarily a specific customer. platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@vicentetfreitas
Copy link

vicentetfreitas commented Feb 29, 2020

[Updated by @timsneath]
On a clean installation of Flutter 1.12 stable and Android Studio 3.6, you get the following error message:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    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.6)
[!] Connected device
    ! No devices available

Workaround is here: #51712 (comment)

@vicentetfreitas vicentetfreitas changed the title X Android license status unknown.. X Android license status unknown. Feb 29, 2020
@gdlis
Copy link

gdlis commented Mar 1, 2020

I am facing this issue with the latest installation of Android Studio (3.6). Flutter doctor is reporting:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    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.6)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

when the flutter doctor --android-licenses command was run:

Android sdkmanager tool not found (C:\Users\User\AppData\Local\Android\sdk\tools\bin\sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.

The location specified by the tool (C:\Users\User\AppData\Local\Android\sdk\tools\bin\sdkmanager) does not exist.

I found a post on SO that stated installing JDK8 resolves the problem. So I tried installing JDK8 and set the SDK location via `File->Other Settings->Default Project Structure->SDKs' in Android Studio. But the problem was not resolved.

@zzzworm
Copy link

zzzworm commented Mar 1, 2020

Also same issue: when i call sdkmanager --version
Warning: Could not create settings
java.lang.IllegalArgumentException
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.(SdkManagerCliSettings.java:428)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:152)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:134)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
but if i run sdkmanager --sdk_root=${ANDROID_HOME} --update it works. but flutter doctor --android-licenses still failed

@zzzworm
Copy link

zzzworm commented Mar 1, 2020

also
flutter doctor --android-licenses -v

A newer version of the Android SDK is required. To update, run:
/Users/nali/Library/Android/sdk/tools/bin/sdkmanager --update
#0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1      AndroidLicenseValidator.runLicenseManager
(package:flutter_tools/src/android/android_workflow.dart:365:7)
#2      Doctor.diagnose (package:flutter_tools/src/doctor.dart:262:38)
#3      DoctorCommand.runCommand
(package:flutter_tools/src/commands/doctor.dart:58:39)
#4      FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:711:18)
#5      _rootRunUnary (dart:async/zone.dart:1134:38)
#6      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#7      _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
#8      Future._propagateToListeners.handleValueCallback
(dart:async/future_impl.dart:682:45)
#9      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#10     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#11     Future._asyncComplete.<anonymous closure>
(dart:async/future_impl.dart:556:7)
#12     _rootRun (dart:async/zone.dart:1126:13)
#13     _CustomZone.run (dart:async/zone.dart:1023:19)
#14     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#15     _CustomZone.bindCallbackGuarded.<anonymous closure>
(dart:async/zone.dart:965:23)
#16     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#18     _runPendingImmediateCallback
(dart:isolate-patch/isolate_patch.dart:118:13)
#19     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:405:11)
#20     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#21     _RawReceivePortImpl._handleMessage
(dart:isolate-patch/isolate_patch.dart:168:12)

@zzzworm
Copy link

zzzworm commented Mar 1, 2020

Also it is strange I can run success from Android Studio, but can't flutter run from command line.

@RobbiNespu
Copy link

RobbiNespu commented Mar 2, 2020

I having same problem

PS D:\Workplace\flutter_projects> flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.657], locale en-MY)
    • Flutter version 1.12.13+hotfix.8 at D:\Workplace\flutter
    • Framework revision 0b8abb4724 (3 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Robbi\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    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.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.42.1)
    • VS Code at C:\Users\Robbi\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.8.1

[√] Connected device (1 available)
    • SM A505F • XXXXXYYYZHW • android-arm64 • Android 9 (API 28)

! Doctor found issues in 1 category.

I try accepting the license with ./sdkmanager.bat --licenses (using this step https://robbinespu.gitlab.io/blog/2020/03/02/flutter-issue-android-license-status-unknown-on-windows/)

but it still does't work

and I notice there is no TOOLs directory on SDK
image

PS D:\Workplace\flutter_projects> flutter doctor --android-licenses -
Android sdkmanager tool not found (C:\Users\Robbi\AppData\Local\Android\sdk\tools\bin\sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.

@iapicca
Copy link
Contributor

iapicca commented Mar 2, 2020

Hi @vicentetfreitas
could you please run flutter doctor --android-licence --verbose

@gdlis @RobbiNespu did you follow the instructions in your logs?

PS D:\Workplace\flutter_projects> flutter doctor --android-licenses -
Android sdkmanager tool not found (C:\Users\Robbi\AppData\Local\Android\sdk\tools\bin\sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.

@izzzworm

A newer version of the Android SDK is required. To update, run:
/Users/nali/Library/Android/sdk/tools/bin/sdkmanager --update

Thank you all

@iapicca iapicca changed the title X Android license status unknown. flutter doctor --android-licenses : Android sdkmanager tool not found Mar 2, 2020
@iapicca iapicca added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 2, 2020
@TahaTesser
Copy link
Member

TahaTesser commented Mar 2, 2020

Hi @vicentetfreitas

Your SDK folder doesn't have SDK Tools

image

To download, SDK tools, Open Android Studio, go to SDK Manager and SDK tools tab and make sure Android SDK Tools is installed

image

Then run flutter doctor --android-licence --verbose and accept all licenses

Thank you

@RobbiNespu
Copy link

there is NO android SDK tools appears on android studio 3.6.1
image

@mukkulsingh
Copy link

mukkulsingh commented Mar 2, 2020

C:\Users\KD\AndroidStudioProjects\flutter_app>flutter doctor --android-licenses --verbose
Android sdkmanager tool not found (C:\Users\KD\AppData\Local\Android\sdk\tools\bin\sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.

#0 throwToolExit (package:flutter_tools/src/base/common.dart:27:3)
#1 AndroidLicenseValidator.runLicenseManager (package:flutter_tools/src/android/android_workflow.dart:309:7)
#2 Doctor.diagnose (package:flutter_tools/src/doctor.dart:247:38)
#3 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:58:39)
#4 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:638:18)
#5 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:75:64)
#6 _rootRunUnary (dart:async/zone.dart:1134:38)
#7 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#8 _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
#9 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#10 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#11 Future._completeWithValue (dart:async/future_impl.dart:526:5)
#12 Future._asyncComplete. (dart:async/future_impl.dart:556:7)
#13 _rootRun (dart:async/zone.dart:1126:13)
#14 _CustomZone.run (dart:async/zone.dart:1023:19)
#15 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#16 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23)
#17 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#18 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#19 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#20 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

@TahaTesser
Copy link
Member

TahaTesser commented Mar 2, 2020

Hi @vicentetfreitas @RobbiNespu @mukkulsingh
If you can't see SDK tools in your SDK manager in your Android Studio

Please download it manually from https://developer.android.com/studio
Open link and scroll the all way down until you see Command line tools only
Download Windows Zip if you're on Windows and extract this zip and paste the tools in your SDK and then run flutter doctor --android-licence --verbose

Thank you

@mukkulsingh
Copy link

Hello @TahaTesser Have Tried doing what you wrote. Unfortunately it didn't worked.

C:\Users\KD\AppData\Local\Android\Sdk\tools\bin>flutter doctor --android-licenses --verbose
A newer version of the Android SDK is required. To update, run:
C:\Users\KD\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

#0 throwToolExit (package:flutter_tools/src/base/common.dart:27:3)
#1 AndroidLicenseValidator.runLicenseManager (package:flutter_tools/src/android/android_workflow.dart:315:7)
#2 Doctor.diagnose (package:flutter_tools/src/doctor.dart:247:38)
#3 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:58:39)
#4 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:638:18)
#5 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:75:64)
#6 _rootRunUnary (dart:async/zone.dart:1134:38)
#7 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#8 _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
#9 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#10 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#11 Future._completeWithValue (dart:async/future_impl.dart:526:5)
#12 Future._asyncComplete. (dart:async/future_impl.dart:556:7)
#13 _rootRun (dart:async/zone.dart:1126:13)
#14 _CustomZone.run (dart:async/zone.dart:1023:19)
#15 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#16 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23)
#17 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#18 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#19 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#20 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)


C:\Users\KD\AppData\Local\Android\Sdk\tools\bin>sdkmanager --update
Warning: Could not create settings
java.lang.IllegalArgumentException
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.(SdkManagerCliSettings.java:428)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:152)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:134)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Usage:
sdkmanager [--uninstall] [] [--package_file=] [...]
sdkmanager --update []
sdkmanager --list []
sdkmanager --licenses []
sdkmanager --version

With --install (optional), installs or updates packages.
By default, the listed packages are installed or (if already installed)
updated to the latest version.
With --uninstall, uninstall the listed packages.

<package> is a sdk-style path (e.g. "build-tools;23.0.0" or
         "platforms;android-23").
<package-file> is a text file where each line is a sdk-style path
               of a package to install or uninstall.
Multiple --package_file arguments may be specified in combination
with explicit paths.

With --update, all installed packages are updated to the latest version.

With --list, all installed and available packages are printed out.

With --licenses, show and offer the option to accept licenses for all
available packages that have not already been accepted.

With --version, prints the current version of sdkmanager.

Common Arguments:
--sdk_root=: Use the specified SDK root instead of the SDK
containing this tool

--channel=<channelId>: Include packages in channels up to <channelId>.
                       Common channels are:
                       0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary).

--include_obsolete: With --list, show obsolete packages in the
                    package listing. With --update, update obsolete
                    packages as well as non-obsolete.

--no_https: Force all connections to use http rather than https.

--proxy=<http | socks>: Connect via a proxy of the given type.

--proxy_host=<IP or DNS address>: IP or DNS address of the proxy to use.

--proxy_port=<port #>: Proxy port to connect to.

--verbose: Enable verbose output.
  • If the env var REPO_OS_OVERRIDE is set to "windows",
    "macosx", or "linux", packages will be downloaded for that OS.

@iapicca
Copy link
Contributor

iapicca commented Mar 2, 2020

Hi all
this is also a possible solution
Thank you

@iapicca iapicca added customer: crowd Affects or could affect many people, though not necessarily a specific customer. tool Affects the "flutter" command-line tool. See also t: labels. platform-android Android applications specifically labels Mar 2, 2020
@mukkulsingh
Copy link

mukkulsingh commented Mar 2, 2020

@iapicca
Thanks for the effort but still it didn't worked.

I tried upgrading sdk from Android/Sdk/cmdline-tools/latest
it did upgraded and when i ran "sdkmanager --licenses" i was able to accept licenses
but even after this flutter doctor gives this:-
C:\Users\KD\AppData\Local\Android\Sdk\cmdline-tools\latest\bin>flutter doctor -v
[√] Flutter (Channel beta, v1.14.6, on Microsoft Windows [Version 10.0.17763.805], locale en-IN)
• Flutter version 1.14.6 at C:\flutter
• Framework revision fabeb2a (5 weeks ago), 2020-01-28 07:56:51 -0800
• Engine revision c4229bf
• Dart version 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\KD\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
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.

[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.42.1)
• VS Code at C:\Users\KD\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.4.1

[√] Connected device (2 available)
• Chrome • chrome • web-javascript • Google Chrome 80.0.3987.122
• Web Server • web-server • web-javascript • Flutter Tools

! Doctor found issues in 1 category.

Came across to many solution but not able to get through this issue with any of those solution out there.

i would like to know why does flutter doctor tell us to update sdk even if we are using the updated (29) one.

Please paste the solution here if anybody gets a working solution

@0x10000
Copy link

0x10000 commented Mar 2, 2020

This is my solution:
1.Download "Command line tools only" from https://developer.android.com/studio , then you'll get the "tools" folder, move it to the sdk root.
2.Restart Android Studio, you'll get a sdk-tools update tips, click update.
3. Run command "flutter doctor --android-licenses", the licences will shown.

@mebden
Copy link

mebden commented Mar 2, 2020

Re: 0x10000's suggestion: this might work in some cases but did not work for me.

A more reliable solution is in my github comment (by mebden) here and in the stackoverflow exchange here.

Basically, in the screen shot above, uncheck Hide Obsolete Packages and you'll see Android SDK Tools (Obsolete) 26.1.1.

My hope is that this bug can be addressed by somebody in the next Flutter version, as several users have been affected from last week onwards.

@TahaTesser
Copy link
Member

Hi @vicentetfreitas

Your SDK tools folder name is wrong, rename it to `tools and you don't need latest folder i your tools

image

@RobbiNespu
Copy link

My solution same like mentioned before, the SDK tool are obsolete so it won't appear by default.

Open your SDK manager then uncheck Hide Obsolete Packages and you’ll see Android SDK Tools (Obsolete) 26.1.1 appears.

if needed we can download package manually here https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip

@pacifio
Copy link

pacifio commented Mar 3, 2020

Google updated their android studio and didn't make flutter adapt to it which made the installation way harder ..

@jhasan94
Copy link

This solution worked for me.

1.Scroll down and Download Command line tools only from this link .[https://developer.android.com/studio#downloads]
2.Put your Downloaded file (tools) in this location C:\Users\ABC\AppData\ABC\Android\Sdk
3.close your android studio , and again open android studio. And check update .
4.open command line and past (flutter doctor --android-licenses) ,don’t use parenthesis.
5. And press ‘y’ for accept
6. Run flutter doctor you should be good.

@maheshj01
Copy link
Member

for android license status unknown issue I would recommend you guys to follow this answer
https://stackoverflow.com/a/60705505/8253662

@JacquesWaltz
Copy link

JacquesWaltz commented Mar 16, 2020

Still having this problem: ✗ Android license status unknown.

Log:

  1. Runned flutter doctor

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc1) ✗ 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.

  1. Runned flutter doctor --android-licenses

A newer version of the Android SDK is required. To update, run: /Users/x/Library/Android/sdk/tools/bin/sdkmanager --update

  1. Runned /Users/x/Library/Android/sdk/tools/bin/sdkmanager --update

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:521) ... 5 more

Cannot update SDKmanager. I've already tried re-installing all SDK tools (obsolete ones too) and via Android Studio.
So, what should I do now?

@aster94
Copy link

aster94 commented Mar 16, 2020

I think that if so many people are facing problems the problem should be resolved by the flutter team
btw downloading the whole android studio should make life easier not complex

@jhasan94
Copy link

Still having this problem: ✗ Android license status unknown.

Log:

1. Runned `flutter doctor`

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc1) ✗ 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.

1. Runned `flutter doctor --android-licenses`

A newer version of the Android SDK is required. To update, run: /Users/x/Library/Android/sdk/tools/bin/sdkmanager --update

1. Runned `/Users/x/Library/Android/sdk/tools/bin/sdkmanager --update`

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:521) ... 5 more

Cannot update SDKmanager. (I've already tried re-installing all SDK tools via Android Studio).
So, what should I do now?

close your android studio and again run it ,Now check for update from your android studio
Screen Shot 2020-03-16 at 11 21 01 PM

@JacquesWaltz
Copy link

Still having this problem: ✗ Android license status unknown.

Log:

1. Runned `flutter doctor`

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc1) ✗ 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.

1. Runned `flutter doctor --android-licenses`

A newer version of the Android SDK is required. To update, run: /Users/x/Library/Android/sdk/tools/bin/sdkmanager --update

1. Runned `/Users/x/Library/Android/sdk/tools/bin/sdkmanager --update`

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:521) ... 5 more
Cannot update SDKmanager. (I've already tried re-installing all SDK tools via Android Studio).
So, what should I do now?

close your android studio and again run it ,Now check for update from your android studio
Screen Shot 2020-03-16 at 11 21 01 PM

Android Studio fully upgraded. Still not working.

@timsneath
Copy link
Contributor

This issue is confirmed in the Flutter 1.12.13+hotfix.8 release, which at the time of writing is the latest version available in the stable channel. Later builds contain a fix; in the meantime, the workaround is to manually add the Android SDK Tools (Obsolete) tool from the Android SDK Manager dialog in Android Studio. More detailed instructions can be found in the getting started documentation.

@maheshj01
Copy link
Member

maheshj01 commented Mar 18, 2020

This issue is confirmed in the Flutter 1.12.13+hotfix.8 release, which at the time of writing is the latest version available in the stable channel. Later builds contain a fix; in the meantime, the workaround is to manually add the Android SDK Tools (Obsolete) tool from the Android SDK Manager dialog in Android Studio. More detailed instructions can be found in the getting started documentation.

heres the step by step guide

  1. open sdk manager
  2. under sdk tools uncheck hide obsolete packages at the bottom
  3. then you should see an option called Android Sdk Tools (Obsolete)

    check it and apply and let the studio download the package
  4. once done run the command flutter doctor and it should now prompt you to run flutter doctor --android-licenses
  5. once you run the license command accept all licenses by hitting y and it should solve the problem

@PolymathWhiz
Copy link

I solved my problem by doing this,

  1. Visit this link (https://developer.android.com/studio) and then Scroll down and Download your OS-specific Command line tools.
  2. Drop your Downloaded file (tools) in this location C:\Users/ABC/Android/Sdk
  3. Close your android studio, and again open android studio. And check update.
  4. Open your terminal or command line and paste -> flutter doctor --android-licenses
  5. And press ‘y’ for accept to accept the different licenses
  6. Run flutter doctor you should be good.

@JacquesWaltz
Copy link

I solved my problem by doing this,

  1. Visit this link (https://developer.android.com/studio) and then Scroll down and Download your OS-specific Command line tools.
  2. Drop your Downloaded file (tools) in this location C:\Users/ABC/Android/Sdk
  3. Close your android studio, and again open android studio. And check update.
  4. Open your terminal or command line and paste -> flutter doctor --android-licenses
  5. And press ‘y’ for accept to accept the different licenses
  6. Run flutter doctor you should be good.

I already have the 'tools' folder because Android Studio was installed properly, with all the packages including 'Command line tools'. Running on macOS btw.

@JacquesWaltz
Copy link

I solved my problem by doing this,

  1. Visit this link (https://developer.android.com/studio) and then Scroll down and Download your OS-specific Command line tools.
  2. Drop your Downloaded file (tools) in this location C:\Users/ABC/Android/Sdk
  3. Close your android studio, and again open android studio. And check update.
  4. Open your terminal or command line and paste -> flutter doctor --android-licenses
  5. And press ‘y’ for accept to accept the different licenses
  6. Run flutter doctor you should be good.

I already have the 'tools' folder because Android Studio was installed properly, with all the packages including 'Command line tools'. Running on macOS btw.

The thing is, when I first installed Flutter all went fine and I already accepted all the licenses. When I tried 'flutter doctor' the next day, android licenses where back to not being accepted. I've tried everything, any other solutions?

@paraita
Copy link

paraita commented Mar 20, 2020

I have the same problem, went through all propositions without success.
In my case I have the following error when running sdkmanager:

Warning: Could not create settings
java.lang.IllegalArgumentException
	at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.<init>(SdkManagerCliSettings.java:428)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:152)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:134)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Usage:
  sdkmanager [--uninstall] [<common args>] [--package_file=<file>] [<packages>...]
  sdkmanager --update [<common args>]
  sdkmanager --list [<common args>]
  sdkmanager --licenses [<common args>]
  sdkmanager --version

With --install (optional), installs or updates packages.
    By default, the listed packages are installed or (if already installed)
    updated to the latest version.
With --uninstall, uninstall the listed packages.

    <package> is a sdk-style path (e.g. "build-tools;23.0.0" or
             "platforms;android-23").
    <package-file> is a text file where each line is a sdk-style path
                   of a package to install or uninstall.
    Multiple --package_file arguments may be specified in combination
    with explicit paths.

With --update, all installed packages are updated to the latest version.

With --list, all installed and available packages are printed out.

With --licenses, show and offer the option to accept licenses for all
     available packages that have not already been accepted.

With --version, prints the current version of sdkmanager.

Common Arguments:
    --sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK
                              containing this tool

    --channel=<channelId>: Include packages in channels up to <channelId>.
                           Common channels are:
                           0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary).

    --include_obsolete: With --list, show obsolete packages in the
                        package listing. With --update, update obsolete
                        packages as well as non-obsolete.

    --no_https: Force all connections to use http rather than https.

    --proxy=<http | socks>: Connect via a proxy of the given type.

    --proxy_host=<IP or DNS address>: IP or DNS address of the proxy to use.

    --proxy_port=<port #>: Proxy port to connect to.

    --verbose: Enable verbose output.

* If the env var REPO_OS_OVERRIDE is set to "windows",
  "macosx", or "linux", packages will be downloaded for that OS.

I'm running MacOS Catalina

@g8d3
Copy link

g8d3 commented Mar 20, 2020

I have the same problem, went through all propositions without success.
In my case I have the following error when running sdkmanager:

Warning: Could not create settings
java.lang.IllegalArgumentException
	at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.<init>(SdkManagerCliSettings.java:428)
	...

I got that. And this helped, using --sdk_root=${ANDROID_HOME} this step passes:

sdkmanager --update --sdk_root=${ANDROID_HOME}

However flutter doctor still does not complete successfully. I am getting:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    ✗ 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.6)
    ✗ 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 3 categories.

@g8d3
Copy link

g8d3 commented Mar 20, 2020

Here is how it worked for me.

I Installed Android SDK using studio.sh from official installer.

That created 2 folders: SDK folder which by default is ~/Android/Sdk, and folder ~/.AndroidStudio3.6

After installation finished and faced several problems. I tried PolymathWhiz suggestion and I got a different message from the console.

Then I tried this:

  1. Run studio.sh from Android SDK installer
  2. Welcome to Android studio window appears
  3. Click configure, then click sdk manager
  4. Go to tab Sdk Tools
  5. Check Android Sdk tools and click apply
  6. For some reason it was unchecked after installation
  7. flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Android Studio (version 3.6)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
    ! No devices available
  1. Went to same configure window and clicked on plugins, then searched for flutter. Installed it. And now flutter doctor outputs:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Android Studio (version 3.6)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

Which is good since I now only need to connect a device for it to work.

@JacquesWaltz
Copy link

Here is how it worked for me.

I Installed Android SDK using studio.sh from official installer.

That created 2 folders: SDK folder which by default is ~/Android/Sdk, and folder ~/.AndroidStudio3.6

After installation finished and faced several problems. I tried PolymathWhiz suggestion and I got a different message from the console.

Then I tried this:

  1. Run studio.sh from Android SDK installer
  2. Welcome to Android studio window appears
  3. Click configure, then click sdk manager
  4. Go to tab Sdk Tools
  5. Check Android Sdk tools and click apply
  6. For some reason it was unchecked after installation
  7. flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Android Studio (version 3.6)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
    ! No devices available
  1. Went to same configure window and clicked on plugins, then searched for flutter. Installed it. And now flutter doctor outputs:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Android Studio (version 3.6)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

Which is good since I now only need to connect a device for it to work.

Are you running on mac or PC?

@paraita
Copy link

paraita commented Mar 20, 2020

After installation finished and faced several problems. I tried PolymathWhiz suggestion and I got a different message from the console.

@g8d3 thanks mate that trick worked !

@timsneath
Copy link
Contributor

Locking this issue to prevent it being polluted by other unrelated issues.

The issue reported at the top of the page is confirmed in the Flutter 1.12.13+hotfix.8 release, which at the time of writing is the latest version available in the stable channel. Later builds contain a fix; in the meantime, the workaround is to manually add the Android SDK Tools (Obsolete) tool from the Android SDK Manager dialog in Android Studio. More detailed instructions can be found in the getting started documentation.

For other issues, please open a new bug, including the results of flutter doctor -v.

@timsneath timsneath reopened this Mar 20, 2020
@flutter flutter locked as off-topic and limited conversation to collaborators Mar 20, 2020
@jonahwilliams
Copy link
Member

Closing as fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: regression It was better in the past than it is now customer: crowd Affects or could affect many people, though not necessarily a specific customer. platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests