Please tell us what you were doing and what went wrong. If you are running flutter tools from the command line, please try adding the
-v
or--verbose
option to gather more information.
flutter upgrade
.What went wrong
✗ Android license status unknown.
What should happen
There shouldn't be a problem. The build from last week did not output a problem, and this week's build shouldn't output a problem.
What I tried to fix the problem
sudo chown -R $USER:$USER /opt/*
flutter doctor --android-licenses
If the problem is with your application's rendering, please attach a screenshot and any relevant source code.
If you are getting an exception in the logs, and your code is implicated in the first few frames, then please include the source code for the functions involved.
Run your application with
flutter run
and attach all the log output.
Launching lib/main.dart on Nexus 5 in debug mode...
Initializing gradle... 0.8s
Resolving dependencies... 11.8s
Running 'gradlew assembleDebug'... 4.7s
Built build/app/outputs/apk/debug/app-debug.apk (26.9MB).
The app then opens in the device and immediately crashes.
Run
flutter analyze
and attach any output of that command also.
Analyzing /home/users/n.gendron/GitLab/n.gendron/techno_store...
lint • Close instances of `dart.core.Sink` at lib/server.dart:10:20 • close_sinks
hint • 'BASE64' is deprecated and shouldn't be used at lib/edit.dart:85:9 • deprecated_member_use
hint • 'JSON' is deprecated and shouldn't be used at lib/globals.dart:70:12 • deprecated_member_use
hint • 'JSON' is deprecated and shouldn't be used at lib/globals.dart:80:19 • deprecated_member_use
hint • 'BASE64' is deprecated and shouldn't be used at lib/item.dart:83:11 • deprecated_member_use
hint • 'JSON' is deprecated and shouldn't be used at lib/server.dart:50:36 • deprecated_member_use
hint • 'JSON' is deprecated and shouldn't be used at lib/server.dart:129:17 • deprecated_member_use
7 issues found.
(Ran in 8.2s)
Oh, what happened the last two days?
Paste the output of running
flutter doctor -v
here.
[✓] Flutter (Channel beta, v0.2.3, on Linux, locale en_US.UTF-8)
• Flutter version 0.2.3 at /home/users/n.gendron/GitHub/flutter
• Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
• Engine revision e61bb9ac3a
• Dart version 2.0.0-dev.35.flutter-290c576264
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /opt/android-sdk/
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /opt/android-sdk/
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
✗ Android license status unknown.
[✓] Android Studio (version 3.1)
• Android Studio at /opt/android-studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] Connected devices (1 available)
• Nexus 5 • 05473ea90a673764 • android-arm • Android 7.1.2 (API 25)
! Doctor found issues in 1 category.
flutter doctor --android-licenses
Warning: java.net.ConnectException: Connection timed out (Connection timed out)
Warning: Failed to download any source lists! Fetch remote repository...
Warning: File /home/users/n.gendron/.android/repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates...
For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.
Edit : Oh hey, I forgot to add some info about my system. It should probably be noted somewhere in the template to add it.
OS: Ubuntu 16.04.4 LTS x86_64
Kernel: 4.13.0-38-generic
Uptime: 17 hours, 31 mins
Packages: 3069
Shell: bash 4.3.48
Resolution: 1024x768, 1920x1080
DE: GNOME 3.18.5
WM: GNOME Shell
WM Theme: Adwaita
Theme: Greybird [GTK2/3]
Icons: Elementary-xfce-darker [GTK2/3]
CPU: Intel i5 660 (4) @ 2.035GHz
GPU: NVIDIA GeForce 8400 GS Rev. 2
Memory: 4576MiB / 7840MiB
java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Edit : Most people stumbling here had a different problem from the one I had, and its solution is here.
Modify
sdkmanager
to use Java 8 by settingJAVA_HOME
_inside_sdkmanager
to a Java 8 installation. It's, by default, at~/Android/Sdk/tools/bin/sdkmanager
.# Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options $ JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions'
@rem Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script. set JAVA_HOME="C:\ProgramData\scoop\apps\android-studio\current\jre" set DEFAULT_JVM_OPTS="-Dcom.android.sdklib.toolsdir=%~dp0\.."
This way, you can keep using a sane and maintained version of Java on your system while simultaneously using
sdkmanager
.# Java export JAVA_HOME=/usr/lib/jvm/default-java
And now I've got some pipelines to repair.
To add some info only - Android's sdkmanager
tool (on windows at least) crashes when executing the check. See the discussion here: https://stackoverflow.com/questions/47150410/failed-to-run-sdkmanager-list-android-sdk-with-java-9.
Similar issues here, but minus the crash. Fairly trivial app still runs.
[✓] Flutter (Channel beta, v0.2.3, on Mac OS X 10.12.6 16G1212, locale en-GB)
• Flutter version 0.2.3 at /Users/ed/devsetups/flutter
• Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
• Engine revision e61bb9ac3a
• Dart version 2.0.0-dev.35.flutter-290c576264
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/ed/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /Users/ed/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
✗ Android license status unknown.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.4.0
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] VS Code (version 1.21.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.10.0
[✓] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 5.1.1 (API 22) (emulator)
! Doctor found issues in 1 category.
I'm not getting any crashes and my app still runs, but flutter doctor
complains about license status for me as well after upgrading.
[√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
• Flutter version 0.2.3 at C:\Users\Caleb\Google Drive\Android\flutter
• Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
• Engine revision e61bb9ac3a
• Dart version 2.0.0-dev.35.flutter-290c576264
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\Caleb\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, 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)
X Android license status unknown.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] VS Code, 64-bit edition (version 1.21.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Dart Code extension version 2.11.1
[!] Connected devices
! No devices available
! Doctor found issues in 2 categories.
Me too, i have tried installing Android sdk 27.0.3
Hi everyone,
type $flutter doctor --android-licenses
It might say some licenses are not accepted(something like that)
you will be asked 'Do you want to review the licenses'?
typey<press enter>
accept all the licenses review.
now check flutter again with $flutter doctor
Trying @Zedonboy's suggestion gave me some more problems...
flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Users\Caleb\AppData\Local\Android\sdk\tools\bin\sdkmanager --update
C:\Users\Caleb\AppData\Local\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:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
@Herohtar - See my reply above. Did that workaround not work?
I submitted a patch for flutter to fix this until the Android tooling issue is resolved.
Android Studio stuff doesn't like Java 9 for whatever reason, simply install and export Java 8 OpenJDK and then rerun, worked for me.
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
flutter doctor --android-licenses
Warning: java.net.ConnectException: Connection timed out (Connection timed out)
Warning: Failed to download any source lists! Fetch remote repository...
Warning: File /home/users/n.gendron/.android/repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates...
flutter doctor -v
[✓] Flutter (Channel beta, v0.2.3, on Linux, locale en_CA.UTF-8)
• Flutter version 0.2.3 at /home/users/n.gendron/GitHub/flutter
• Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
• Engine revision e61bb9ac3a
• Dart version 2.0.0-dev.35.flutter-290c576264
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /opt/android-sdk/
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /opt/android-sdk/
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
✗ Android license status unknown.
[✓] Android Studio (version 3.1)
• Android Studio at /opt/android-studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] Connected devices (1 available)
• Nexus 5 • 05473ea90a673764 • android-arm • Android 7.1.2 (API 25)
! Doctor found issues in 1 category.
I set the JAVA_HOME with the JRE in the Android studio and then flutter doctor --android-licenses just worked. For me, the JRE path was C:\Program Files\Android\Android Studio\jre
@lukef I tried your workaround, but unfortunately it did not do anything for me. Do you need to do something more than just adding the one line in android_sdk.dart
?
I was able to make it work using @wongni's method of just pointing JAVA_HOME
at the Android Studio JRE, but that doesn't seem ideal.
@Herohtar - if you modify the tools you need to also clear the build tools snapshot to rebuild them otherwise that one line change wont do anything. If you read the link I posted the workaround is to use the SDKMANAGER_OPTS
environment variable. That's all that my change is actually doing.
On a mac it would be:
export SDKMANAGER_OPTS="--add-modules java.se.ee"
This should solve the Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
error that you are seeing when sdkmanager
is run.
Alternatively, that link offers other suggestions. If you find out that the solution is different, report back.
The link again in case you missed it: https://stackoverflow.com/questions/47150410/failed-to-run-sdkmanager-list-android-sdk-with-java-9.
@lukef The above env var worked for me. Many thanks for this.
@lukef Ah, thanks. It works with your change after deleting the flutter tools snapshot.
i had the same problem. tried all of the above but didn't fix it. what i did is:
Please have backups before continuing, expecially sdkmanager part
went to Environment variables and added ANDROID_HOME with a variable value of: C:\Users\%username%\AppData\Local\Android\Sdk
then my JAVA_HOME
with this variable value:
C:\Program Files\Android\Android Studio\jre
then my Path
with this variable value:
C:\Users\%username%\flutter\bin
Then I went to C:\Users\%username%\AppData\Local\Android\Sdk\tools\bin
and opened sdkmanager.bat
with a note editor, this was my DEFAULT_JVM_OPTS
:
@rem Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Dcom.android.sdklib.toolsdir=%~dp0\.."
Then i ran:
flutter doctor
got output of:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 3.1)
[√] Connected devices (1 available)
! Doctor found issues in 1 category.
Then i ran
flutter doctor --android-licenses
and accepted all Terms & Conditions with (y)
This solved my problems. hope it helps you.
Fix was reverted because it introduced other problems. Re-opening.
FYI, the other problems that it introduced are detailed in https://github.com/flutter/flutter/issues/16228
i have this same issue, i tried
flutter doctor --android-licenses
it show me this message
A newer version of the Android SDK is required. To update, run:
F:\Sdk\tools\bin\sdkmanager --update
and sdkmanager --update give me this warning
Warning: File C:\Users\Amine\.android\repositories.cfg could not be loaded.
done
i checked that path there no file named repositories.cfg
and then i updated sdk manager from android studio
and still have the same issue
flutter doctor -v
[√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
• Flutter version 0.2.3 at F:\flutter
• Framework revision 5a58b36e36 (3 weeks ago), 2018-03-13 13:20:13 -0700
• Engine revision e61bb9ac3a
• Dart version 2.0.0-dev.35.flutter-290c576264
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at F:\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-P, build-tools 27.0.3
• ANDROID_HOME = F:\Sdk
• 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)
X Android license status unknown.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] VS Code, 64-bit edition (version 1.20.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Dart Code extension version 2.9.2
[!] Connected devices
! No devices available
! Doctor found issues in 2 categories.
@AmineMersoul
Got the same issue, I've tried to create an empty repositories.cfg file but Android license status unknown. still remain.
Ref: https://stackoverflow.com/questions/43433542/stuck-at-android-repositories-cfg-could-not-be-loaded
Here is how I fixed this issue #16280 on my Mac :-)
@lukef do you know if there's a way to re-introduce #16035 in such a way as to avoid #16228?
I encountered this problem on MacOS just now, it turned out to be a lack of JDK. Here is my solution:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
flutter doctor -v
again, if you see something like:then run command flutter doctor --android-licenses
and accept licenses.
Hope this will be helpful.
@tvolkert - sorry for the late reply.
I have a valid JAVA_HOME
and am using Java 9. I can upgrade to Java 10 and try again.
I thought the flag would be ignored by Java 8 and below (I think this is a java 9+ flag). Sorry about that.
With that said, I feel like there may be an inherent danger in solving this problem via code as, ultimately, the fix belongs in the Android tooling and not in Flutter. Maybe this is a documentation issue instead. The overall workarounds available now are:
export SDKMANAGER_OPTS="--add-modules java.se.ee"
It's annoying to ask people to add yet another environment variable, so I could see that as being unacceptable, but it will fix the issue.
Otherwise, we could attempt to detect the installed Java version and apply the flag conditionally. This is probably super hard across all platforms to do it consistently.
i have both Java 8 and 9 installed in my computer
but in windows environment variables path i set JAVA_HOME to C:\Program Files\Java\jdk1.8.0_151
i still have the problem
@lukef we already have code that tries to validate the Java version, so that ship's already sailed:
You could refactor that such that we had a String get javaVersion
getter that we could consult in the sdkManagerEnv
getter...
Awesome. Ok, let me take a look at it tomorrow. I will need to set up so i can test various java versions.
FINAL SOLUTION
Go to SDK root
C:\Users\%user%\AppData\Local\Android\Sdk\tools\bin
for me
open a Terminal on this folder, and run the command:
sdkmanager --licenses
thanks!
@Snapjv Thanks, this solution work for me.
@AmineMersoul Try looking at this one #16452 this might help.
I am using Java 9.0.4. The solution proposed by @Snapjv does not work for me
C:\Android\Sdk\tools\bin>java --version
java 9.0.4
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
C:\Android\Sdk\tools\bin>.\sdkmanager.bat --licenses
All SDK package licenses accepted.======] 100% Computing updates...
C:\Android\Sdk\tools\bin>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Android\Sdk\tools\bin\sdkmanager --update
C:\Android\Sdk\tools\bin>.\sdkmanager --update
[=======================================] 100% Computing updates...
C:\Android\Sdk\tools\bin>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Android\Sdk\tools\bin\sdkmanager --update
C:\Android\Sdk\tools\bin>flutter doctor -v
[√] Flutter (Channel master, v0.2.12-pre.33, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
• Flutter version 0.2.12-pre.33 at D:\dev\flutter
• Framework revision ea30c95dc9 (4 hours ago), 2018-04-13 17:02:14 -0700
• Engine revision 76cb311d9c
• Dart version 2.0.0-dev.47.0.flutter-f76dad0adc
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: C:\Android\AndroidStudio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
X Android license status unknown.
[√] Android Studio (version 3.1)
• Android Studio at C:\Android\AndroidStudio
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] IntelliJ IDEA Community Edition (version 2017.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3
• Flutter plugin version 22.2.2
• Dart plugin version 173.4548.30
[√] VS Code, 64-bit edition (version 1.22.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Dart Code extension version 2.11.2
[!] Connected devices
! No devices available
! Doctor found issues in 2 categories.
C:\Android\Sdk\tools\bin>.\sdkmanager --update --verbose
Info: Parsing C:\Android\Sdk\add-ons\addon-google_apis-google-22\package.xml
Info: Parsing C:\Android\Sdk\build-tools\22.0.1\package.xml
Info: Parsing C:\Android\Sdk\build-tools\25.0.3\package.xml
Info: Parsing C:\Android\Sdk\build-tools\27.0.3\package.xml
Info: Parsing C:\Android\Sdk\build-tools\28.0.0-rc1\package.xml
Info: Parsing C:\Android\Sdk\emulator\package.xml
Info: Parsing C:\Android\Sdk\extras\android\m2repository\package.xml
Info: Parsing C:\Android\Sdk\extras\google\m2repository\package.xml
Info: Parsing C:\Android\Sdk\extras\google\usb_driver\package.xml
Info: Parsing C:\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager\package.xml
Info: Parsing C:\Android\Sdk\patcher\v4\package.xml
Info: Parsing C:\Android\Sdk\platform-tools\package.xml
Info: Parsing C:\Android\Sdk\platforms\android-22\package.xml
Info: Parsing C:\Android\Sdk\platforms\android-25\package.xml
Info: Parsing C:\Android\Sdk\platforms\android-26\package.xml
Info: Parsing C:\Android\Sdk\platforms\android-27\package.xml
Info: Parsing C:\Android\Sdk\sources\android-27\package.xml
Info: Parsing C:\Android\Sdk\system-images\android-22\default\armeabi-v7a\package.xml
Info: Parsing C:\Android\Sdk\system-images\android-22\google_apis\armeabi-v7a\package.xml
Info: Parsing C:\Android\Sdk\system-images\android-27\google_apis\x86\package.xml
Info: Parsing C:\Android\Sdk\tools\package.xml
[=======================================] 100% Computing updates...
C:\Android\Sdk\tools\bin>flutter --verbose doctor -v
[ +43 ms] [D:\dev\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[ +99 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ +2 ms] origin/master
[ ] [D:\dev\flutter\] git rev-parse --abbrev-ref HEAD
[ +51 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +2 ms] master
[ ] [D:\dev\flutter\] git ls-remote --get-url origin
[ +46 ms] Exit code 0 from: git ls-remote --get-url origin
[ +1 ms] https://github.com/flutter/flutter.git
[ ] [D:\dev\flutter\] git log -n 1 --pretty=format:%H
[ +55 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ +1 ms] ea30c95dc99de6f86f23caca3d219c5f89a19bff
[ ] [D:\dev\flutter\] git log -n 1 --pretty=format:%ar
[ +48 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ +9 ms] 4 hours ago
[ +2 ms] [D:\dev\flutter\] git describe --match v*.*.* --first-parent --long --tags
[ +86 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ +1 ms] v0.2.11-33-gea30c95dc
[+1345 ms] java -version
[ +223 ms] [√] Flutter (Channel master, v0.2.12-pre.33, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
[ +5 ms] • Flutter version 0.2.12-pre.33 at D:\dev\flutter
[ ] • Framework revision ea30c95dc9 (4 hours ago), 2018-04-13 17:02:14 -0700
[ ] • Engine revision 76cb311d9c
[ ] • Dart version 2.0.0-dev.47.0.flutter-f76dad0adc
-[ +3 ms] C:\Android\Sdk\tools\bin\sdkmanager --licenses
[ +5 ms] C:\Android\Sdk\platform-tools\adb devices -l
[ +28 ms] Exit code 0 from: C:\Android\Sdk\platform-tools\adb devices -l
[ +1 ms] List of devices attached
[ +15 ms] C:\Android\Sdk\platform-tools\adb devices -l \[ +65 ms] List of devices attached [ +292 ms] [!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[ ] • Android SDK at C:\Android\Sdk
[ ] • Android NDK location not configured (optional; useful for native profiling support)
[ ] • Platform android-27, build-tools 27.0.3
[ ] • Java binary at: C:\Android\AndroidStudio\jre\bin\java
[ ] • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[ ] X Android license status unknown.
[ +1 ms] [√] Android Studio (version 3.1)
[ ] • Android Studio at C:\Android\AndroidStudio
[ +1 ms] • Flutter plugin version 23.2.2
[ +3 ms] • Dart plugin version 173.4700
[ +1 ms] • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[ +1 ms] [√] IntelliJ IDEA Community Edition (version 2017.3)
[ ] • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3
[ ] • Flutter plugin version 22.2.2
[ ] • Dart plugin version 173.4548.30
[ +2 ms] [√] VS Code, 64-bit edition (version 1.22.1)
[ ] • VS Code at C:\Program Files\Microsoft VS Code
[ +3 ms] • Dart Code extension version 2.11.2
[ +1 ms] [!] Connected devices
[ ] ! No devices available
[ ] ! Doctor found issues in 2 categories.
[ +26 ms] "flutter doctor" took 1,891ms.
C:\Android\Sdk\tools\bin>sdkmanager --licenses
All SDK package licenses accepted.======] 100% Computing updates...
If you use Oracle or any other JVM, skip to STEP-2
In Terminal:
STEP-1:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
STEP-2:
flutter doctor --android-licenses
You have to accept all licenses by typing "y" and Enter :grinning:
Error seen here:
EDIT
To solve this problem ^ , I changed from JDK 9 to JDK 1.8.0. There is definitely an issue with JDK 9.
1) I am using export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home"
2) type flutter doctor --android-licenses
3) type y
and hit enter to accept all licenses, as other users have stated.
@mrk-han look at the comments above, 3 times it was advised to use OpenJDK 8
I'm still hoping to add the correct checks but I've been out of office for a few weeks. I'll be looking to do it next week. However, it is probably still advised to use JDK 8 as @ac130kz and others have stated as that is (as far as I know) the supported JDK.
@tvolkert The flutter tool attempts to use the bundled android studio runtime as the default but the SDK manager will use the version of Java as defined in JAVA_HOME. This creates something of a mismatch. Should the tool be defaulting to the JAVA_HOME version for everything? Does this create onboarding issues?
Open your Git Bash
type flutter doctor --android-licenses
press y to accept, this process may occurred several times.
type _flutter doctor_ & check again.
Go to the folder where sdkmanager is.
And run cmd in this folder type this : sdkmanager --licenses
Accept all queries with "y"...
then try again...
@serdarpolat
Yes, this has been stated numerous times; it works unless using Java 9.
@lukef what if we warned (via a doctor validator) when the bundled android studio runtime and JAVA_HOME
disagree with one another?
I got the same issue, and just set java environment point to java 8. Then, run command "flutter doctor --android-licenses" again, it will display "4 of 6 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)?", just accept all of that.
I have tried to resolve the issue by trying to run flutter doctor --android-licenses
as mentioned by @Zedonboy in the above discussion. here is the output:
C:\Users\hp>flutter doctor -v
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.112], locale en-US)
• Flutter version 0.5.1 at F:\flutter
• Framework revision c7ea3ca377 (5 weeks ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at F:\AndroidStudio\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = F:\AndroidStudio\sdk
• 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)
X Android license status unknown.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[!] Connected devices
! No devices available
! Doctor found issues in 2 categories.
C:\Users\hp>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
F:\AndroidStudio\sdk\tools\bin\sdkmanager --update
C:\Users\hp>F:\AndroidStudio\sdk\tools\bin\sdkmanager --update
Warning: An error occurred while preparing SDK package Android SDK Platform-Tools: archive is not a ZIP archive.
@MishraUdit sdkmanager
is not related to Flutter. There seems to be an issue with your Android SDK setup.
It could also be an issue with your F:
drive (read-only, or similar)
Thank you for your quick response @zoechi, however, there is no issue with my drive.
I used the command F:\AndroidStudio\sdk\tools\bin\sdkmanager --licenses
instead F:\AndroidStudio\sdk\tools\bin\sdkmanager --update
and it asked for accepting the licenses.
after accepting it, everything is fine. This solved my issue. Maybe I was trying the wrong command to accept the licenses. And I hope this will help others too. Here is output:
C:\Users\hp>flutter doctor -v
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.112], locale en-US)
• Flutter version 0.5.1 at F:\flutter
• Framework revision c7ea3ca377 (5 weeks ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at F:\AndroidStudio\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = F:\AndroidStudio\sdk
• 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 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[!] Connected devices
! No devices available
! Doctor found issues in 1 category.
C:\Users\hp>
On Windows 10, this worked for me:
set JAVA_OPTS=-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
Then:
C:\Users\%username%\AppData\Local\Android\Sdk\tools\bin\sdkmanager --licenses
To make it stick, add JAVA_OPTS
to your environment permanently.
@acangiano Would you mine to describe why without set ...
command is related to NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
that was thrown when I called only sdkmanager --licenses
.
I got issue of licence agreement not accepted
but now it is solved
1] i have re-installed the android platform 27 from android studio
2] Then i used visual studio code and done flutter run it run smoothly without any issue
3] then i check flutter doctor in visual studio code terminal there was no issue found
C:\flutter_windows_v0.5.1-beta\myapp>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 6.1.7601], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.1)
[√] Connected devices (1 available)
• No issues found!
C:\flutter_windows_v0.5.1-beta\myapp>
see this
$ flutter run
Launching lib/main.dart on Z60 in debug mode...
Initializing gradle...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
I/FlutterActivityDelegate(13482): onResume setting current activity to this
Syncing files to device Z60...
D/GraphicBuffer(13482): register, handle(0xa95ad680) (w:480 h:854 s:480 f:0x1 u:0x000b00)
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on Z60 is available at: http://127.0.0.1:8100/
For a more detailed help message, press "h". To quit, press "q".
Application finished.
On Windows 10 in PowerShell run the following, before running flutter
or the sdkmanager
command:
$Env:JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee"
Then you can run
flutter doctor --android-licenses
# or
C:\Users\%username%\AppData\Local\Android\Sdk\tools\bin\sdkmanager --licenses
Thanks @acangiano for the command
FINAL SOLUTION
Go to SDK root
for me
C:\Users\%user%\AppData\Local\Android\Sdk\tools\bin
open a Terminal on this folder, and run the command:
sdkmanager --licenses
thanks!
Confirmed that @acangiano solution works on macOS Mojave too:
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
Then:
sdkmanager --update
Then flutter doctor
will be ok.
Using Java 10.
I had a problem "Android License Status Unknown!" after running -flutter doctor
and simply run "flutter doctor --android-licenses"
didn't help.
so what you have to do is:
sudo Library/Android/sdk/tools/bin/sdkmanager --update
")after this I had a new Exception:
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:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
if you don't have NoClassDefFoundError: lalalalalal go to step 6.
if no - step 2 for you:
sudo nano Library/Android/sdk/tools/bin/sdkmanager
DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME"'
with new line:
DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
sudo Library/Android/sdk/tools/bin/sdkmanager --update
flutter doctor --android-licenses
and say YES to all that license.This is not an issue at all!!
Just update the Android SDK from Android Studio. This will take some time according to your internet speed.
Restart flutter console if it was opened.
Run flutter doctor
.
It will say some licences not accepted.
Now run, flutter doctor --android-licenses
.
Press y and press Enter key when it ask for confirmation.
Run flutter doctor
again.
Now your problem will be resolved.
after got Android license status unknown
I run flutter doctor --android-licenses
then the output is
Warning: java.net.ConnectException: Operation timed out
Warning: Failed to download any source lists! Fetch remote repository...
Warning: File /Users/raymondguo/.android/repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates...
when I type flutter doctor again, I still get:
Android license status unknown.
@potatoker can you paste the output of flutter --verbose doctor --verbose --android-licenses
?
@potatoker Check if your Java is in its latest version. else update it to its latest.
@potatoker have you tried this solution? https://github.com/flutter/flutter/issues/16025#issuecomment-404986334
It works on mac too (changing how you set the variable, of course).
I run
flutter doctor --android-licenses
hi, I found that it is because I did not set my java network proxy.It is ok now
@potatoker I filed https://github.com/flutter/flutter/issues/24867 for us to detect this case and provide a more helpful message to guide the developer here.
I resolved this problem setting this environment variable.
export JAVA_HOME="/usr/lib/jvm/default-java"
archlinux
resolved this problem after installed and initialized android-stuido.
After uninstalled android-studio, it appears again.😰(why???)
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.0.0, on Linux, locale zh_CN.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
✗ Android license status unknown.
[!] Android Studio (not installed)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
~ $ flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
~ $ /opt/android-sdk/tools/bin/sdkmanager --update
/opt/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:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
~ $ pacman -S android-studio
~ $ flutter doctor --android-licenses
it works
~ $ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.0.0, on Linux, locale zh_CN.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] Android Studio (version 3.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
• No issues found!
~ $ pacman -S android-studio
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.0.0, on Linux, locale zh_CN.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
✗ Android license status unknown.
[!] Android Studio (not installed)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
😂 I am back
I was having this problem changed java from 11 to 8 and it worked. If you having the same problem do this (I am using a mac):
If you have changed the sdkmanager file before do:
sudo nano Library/Android/sdk/tools/bin/sdkmanager
and be sure that the line is exactly like this
DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME"'
now check /usr/libexec/java_home --verbose
this gives you all the version os java installed in your computer and their home directory. See if you have one Java SE 8 version, if not, install it. Than change JAVA_HOME env variable like this:
export JAVA_HOME='Put here the home directory of Java 8 version that you got from the verbose command'
now run /Users/'your username here'/Library/Android/sdk/tools/bin/sdkmanager --update
and it will work
Anyone get flutter to accept jdk 11 yet? I had to downgrade to 8 to get flutter to work (license issue with 11).
@lemon07r as far as I know Android SDK limits to Java 8 and there is nothing Flutter can do about that.
Trying @Zedonboy's suggestion gave me some more problems...
flutter doctor --android-licenses A newer version of the Android SDK is required. To update, run: C:\Users\Caleb\AppData\Local\Android\sdk\tools\bin\sdkmanager --update
C:\Users\Caleb\AppData\Local\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:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) ... 5 more
But did you finally solve it?I have the same problem...
I solved this problem.
My OS is Windows 10.
Worked Android Studio:
1.Android SDK Tools 25.0.2 uninstall.
2.Android SDK Tools 26.1.1 install.
C:\Users\leekabyeon\dart\flutter>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel origin/master, v1.1.6-pre.11, on Microsoft Windows [Version 10.0.17763.195], locale ko-KR)
[!] Android toolchain - develop for Android devices (Android SDK version 27.0.3)
X Android license status unknown.
[!] Android Studio (version 3.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
[√] VS Code (version 1.30.1)
[!] Connected device
! No devices available
C:\Users\leekabyeon\AppData\Local\Android\sdk\tools\bin\sdkmanager --licenses
Error: Unknown argument --licenses
Usage:
sdkmanager [--uninstall] [<common args>] \
[--package_file <package-file>] [<packages>...]
sdkmanager --update [<common args>]
sdkmanager --list [<common args>]
In its first form, installs, or uninstalls, or updates 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.
In its second form (with --update), currently installed packages are
updated to the latest version.
In its third form, all installed and available packages are printed out.
C:\Users\leekabyeon\dart\flutter>C:\Users\leekabyeon\AppData\Local\Android\sdk\tools\bin\sdkmanager --licenses
All SDK package licenses accepted.======] 100% Computing updates...
C:\Users\leekabyeon\dart\flutter>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel origin/master, v1.1.6-pre.11, on Microsoft Windows [Version 10.0.17763.195], locale ko-KR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] Android Studio (version 3.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
[√] VS Code (version 1.30.1)
[!] Connected device
! No devices available
For now if you don't like to change JAVA_HOME, set that only for sdkmanager, open %ANDROID_STUDIO_PATH%\Sdk\tools\bin\sdkmanager.bat
using text editor, and search for :findJavaFromJavaHome
below it add the following line:
set JAVA_HOME=D:/Android/Android Studio/jre
my ANDROID_STUDIO_PATH is D:/Android/Android Studio
here so change it as your setup.
That solved my issue without adding SDKMANAGER_OPTS
because with it I was getting the issue mentioned here #22361 ...
Edit:
--add-modules java.se.ee
is not going to work in JDK 11 anyway, so it is pointless for JDK 11, only works for JDK 9 and JDK 10.
Trying @Zedonboy's suggestion gave me some more problems...
flutter doctor --android-licenses A newer version of the Android SDK is required. To update, run: C:\Users\Caleb\AppData\Local\Android\sdk\tools\bin\sdkmanager --update
C:\Users\Caleb\AppData\Local\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:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) ... 5 more
I think you should check your java sdk
@Herohtar You need to edit ~/Android/Sdk/tools/bin/sdkmanager
and change DEFAULT_JVM_OPTS
to
DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
That makes sdkmanager
able to run without errors
@NatoBoram You missed an apostrophe. For those copy-pasting:
DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
In any case, the fix didn’t work for me. I get the following output when I run sdkmanager
, no matter what options I pass in:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.se.ee not found
For reference, I’m seeing the exact same error messages as @Herohtar. I’ve also tried @arlucio’s advice, but to no avail; I have Java SE 8 installed, but it doesn’t seem to make a difference, even when I point to it using the $JAVA_HOME
environment variable. I’m on Flutter 1.1.9 dev channel, running OS X 10.14.2 build 18C54; I have Android SDK 28.0.3, as installed by Android Studio via JetBrains Toolbox.
Update: I was using fish
shell, so environment variables weren’t making their way over. The solution was to use env
or alternatively, add the following line within the sdkmanager
file itself:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_XXX.jdk/Contents/Home
The proper fix would have to be considerably upstream (i.e., in the Android SDK itself) to use Java 8 when available rather than any newer versions installed, as suggested by @lukef & @zoechi. Still not sure exactly why the given library doesn’t load properly in Java 9+. I plan to try @lukef’s other suggestion before signing off.
@NatoBoram I'm on Windows, so it's a slightly different string, but even using the Windows version of that variable doesn't work -- I get the same java.lang.module.FindException: Module java.se.ee not found
error that @ron-wolf mentions.
The only thing that ever worked for me was locally applying @lukef's patch, which apparently got reverted due to some other errors it caused.
However, so far I haven't run into any issues because of that warning and I've given up and just leave it alone... it's still annoying to not see all green when running flutter doctor
though...
Not work,Mac os with java 11,and reinstalled Android Studio,latest flutter,got error
java.lang.module.FindException: Module java.se.ee not found
I already searched stackoverflow and flutter issues,loop with several possible solutions,but return back again. https://github.com/flutter/flutter/issues/28504
@leapit That's because Flutter uses sdkmanager
, which uses Java 8, while Java 10 has java.se.ee
deprecated.
You need to edit
~/Android/Sdk/tools/bin/sdkmanager
and changeDEFAULT_JVM_OPTS
toDEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
That makes
sdkmanager
able to run without errors
If that still doesn't work, then downgrade to Java 8 to accept licenses, then switch back to Java 11.
You can also try to run sdkmanager
manually with Java 8, accept licenses, then Flutter should detect them as accepted. On linux, it's at ~/Android/Sdk/tools/bin/sdkmanager
by default. You can add $HOME/Android/Sdk/tools/bin/
to your path to call it with sdkmanager
.
@NatoBoram that's quite clear,thanks,finally i installed java 8,and accept the license solved this issue
OpenJDK 10 was superseeded by OpenJDK 11, which doesn't implement java.se.ee
at all. This means that the hack of adding --add-modules java.se.ee
doesn't do anything anymore. It also means that OpenJDK 10 will be automatically removed from your system and replaced with OpenJDK 11 the next time you update, if your updates are configured properly.
To fix that, modify sdkmanager
to use Java 8 by setting JAVA_HOME
inside sdkmanager
to a Java 8 installation. It's still, by default, at ~/Android/Sdk/tools/bin/sdkmanager
.
# Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options $
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions'
@rem Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script.
set JAVA_HOME="C:\ProgramData\scoop\apps\android-studio\current\jre"
set DEFAULT_JVM_OPTS="-Dcom.android.sdklib.toolsdir=%~dp0\.."
This way, you can keep using a sane and maintained version of Java on your system while simultaneously using sdkmanager
.
# Java
export JAVA_HOME=/usr/lib/jvm/default-java
And now I've got some pipelines to repair.
After everything failed, I just downloaded jdk 8. Updated my JAVA_HOME environment variable to jdk 8 and then ran flutter doctor --android-licenses
. It worked
Thank you, @NatoBoram! That finally solved it for me!
Here are the details for anyone running on Windows (at least, this is what worked for me on Windows 10).
On Windows, Android Studio includes an embedded version of the JDK. If you look at the JDK Location setting, the recommended option is to use that one instead of using your own installed version. The path listed when using the embedded option on my system was C:\Program Files\Android\Android Studio\jre
.
So I just added a definition for JAVA_HOME
to the file %LOCALAPPDATA%\Android\sdk\tools\bin\sdkmanager.bat
so the relevant section now looks like this:
@rem Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script.
set JAVA_HOME="C:\Program Files\Android\Android Studio\jre"
set DEFAULT_JVM_OPTS="-Dcom.android.sdklib.toolsdir=%~dp0\.."
I was then able to run flutter doctor --android-licenses
to accept the missing licenses and the output of flutter doctor
no longer shows an error!
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.2.1, on Microsoft Windows [Version 10.0.17763.316], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] VS Code (version 1.31.1)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
it may happen that you accept all licenses agreement and shows 100% completed then run again
$ flutter doctor
it shows the same un agreed messages. the problem might be some of the android files needs Sudo access, because it's not able to update the agreed licenses, however quick hack is
chmod 755 -R ANDORID_ROOT_PATH
This is for linux, But this is a new case outside the main topic but related to the topic.
It seems to fix for me on Windows
If you like powershell
$ENV:JAVA_HOME="C:\Program Files\Java\jdk1.8.0_181"
$ENV:JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee"
$ENV:DEFAULT_JVM_OPTS='"-Dcom.android.sdlib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions'
If you like cmd
set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_181"
set JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee"
set DEFAULT_JVM_OPTS='"-Dcom.android.sdlib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions'
Android Studio stuff doesn't like Java 9 for whatever reason, simply install and export Java 8 OpenJDK and then rerun, worked for me.
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
export don't work in windows, What should I do in windows for exporting path
@knightcube Have you tried https://github.com/flutter/flutter/issues/16025#issuecomment-468009198?
@akshaybengani That was already answered by both https://github.com/flutter/flutter/issues/16025#issuecomment-468958533 and https://github.com/flutter/flutter/issues/16025#issuecomment-477833134.
@akshaybengani - environmental variables in windows
On a Mac, if you have Android Studio installed, you can just point JAVA_HOME to its Java. Run flutter doctor with the android-licenses parameter and accept all licenses when prompted.
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
flutter doctor --android-licenses
flutter doctor
I had to use JDK 10:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
/Users/guiguan/Library/Android/sdk/tools/bin/sdkmanager --update
flutter doctor --android-licenses
in my case had to downgrade my java version 12 to 8.it solved the problem.
try downgrade java
I solved this problem.
My OS is Windows 10.
Worked Android Studio:
1.Android SDK Tools 25.0.2 uninstall.
2.Android SDK Tools 26.1.1 install.
C:\Users\leekabyeon\dart\flutter>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel origin/master, v1.1.6-pre.11, on Microsoft Windows [Version 10.0.17763.195], locale ko-KR) [!] Android toolchain - develop for Android devices (Android SDK version 27.0.3) X Android license status unknown. [!] Android Studio (version 3.2) X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. [√] IntelliJ IDEA Ultimate Edition (version 2018.3) [√] VS Code (version 1.30.1) [!] Connected device ! No devices available
```
C:UsersleekabyeonAppDataLocalAndroidsdktoolsbinsdkmanager --licenses
Error: Unknown argument --licenses
Usage:
sdkmanager [--uninstall] []
[--package_file] [ ...]
sdkmanager --update []
sdkmanager --list [] In its first form, installs, or uninstalls, or updates packages.
is a sdk-style path (e.g. "build-tools;23.0.0" or
"platforms;android-23").
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.
In its second form (with --update), currently installed packages are
updated to the latest version.
In its third form, all installed and available packages are printed out.
C:Usersleekabyeondartflutter>C:UsersleekabyeonAppDataLocalAndroidsdktoolsbinsdkmanager --licenses
All SDK package licenses accepted.======] 100% Computing updates...
C:Usersleekabyeondartflutter>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel origin/master, v1.1.6-pre.11, on Microsoft Windows [Version 10.0.17763.195], locale ko-KR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] Android Studio (version 3.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
[√] VS Code (version 1.30.1)
[!] Connected device
! No devices available
```
我按照你的方法解决了这个Bug,不过有些不一样的事情的,我有进行tools的拷贝。
给大家看看我解决的办法
我就直接把c盘中的那个tools拷贝到了d盘软件sdk目录下面
再次运行,他会有一个是否接受这个licences
点击y就行
大家还可以看我的博客哇:https://www.cnblogs.com/smart-girl/p/10694891.html
I think it's time to close this issues. The original issue was about Java being a dick and not using my work company's proxy, but I have since changed workstation with a different proxy configuration. I should have closed this issue back then.
Specifically, my issue was this :
Warning: java.net.ConnectException: Connection timed out (Connection timed out)
Warning: Failed to download any source lists! Fetch remote repository...
Warning: File /home/users/n.gendron/.android/repositories.cfg could not be loaded.
The problem that most people are encountering is about SDKManager using an outdated version of Java, and a fix for that problem is https://github.com/flutter/flutter/issues/16025#issuecomment-468009198. New commenters are obviously people that don't care enough to fix their problem to read previous replies and use the provided solution, and I feel a bit insulted.
There were other problems in the meantime, but the Flutter team fixed them and I am grateful for that. However, the new problem is on Android Studio's part, not Flutter's part.
One thing they could do is to locate the Android Studio installation and temporarily set JAVA_HOME
to Android Studio's Java installation. That would be a future-proof solution, but that doesn't fix the root problem.
i had the same problem. tried a lot but didn't fix it. last what i did is
$ANDROID_HOME/tools/bin/sdkmanager --licenses
As I'm using JDK11, I needed to copy the missing libraries to /home/user/Android/Sdk/tools/lib
.
I've downloaded them from maven central repository:
https://search.maven.org/remotecontent?filepath=com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar
https://search.maven.org/remotecontent?filepath=org/glassfish/jaxb/jaxb-runtime/2.3.1/jaxb-runtime-2.3.1.jar
https://search.maven.org/remotecontent?filepath=com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar
https://search.maven.org/remotecontent?filepath=javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar
and them called /home/cvgaviao/Android/Sdk/tools/bin/sdkmanager --update
and flutter doctor --android-licenses
Hi everyone,
type$flutter doctor --android-licenses
It might say some licenses are not accepted(something like that)
you will be asked 'Do you want to review the licenses'?
typey<press enter>
accept all the licenses review.
now check flutter again with
$flutter doctor
This solved my issues, thanks
@devlwkyan When I type this, it says "Command not found"
raymondfontaine$ $flutter doctor --android-licenses
-bash: doctor: command not found
Raymonds-MacBook-Air:~ raymondfontaine$
What else can I do?
This works only if you have the correct sdk manager version, flutter doctor --android-licenses
if you don't it tells you how to update it, also the sdk manager version doesn't like java9 so I had to change my path to java8, updated sdk manager, and then did android licenses. Hit Yes on all prompts, and done.
that is the solution of the problem
https://stackoverflow.com/questions/45182717/java-home-is-set-to-an-invalid-directory/49592887
@NatoBoram many thanks, your solution worked for me.
the jdk version must be less than jdk9
I had the same issue. Just replace java>=9 version with 8.
Then if you try this:
flutter doctor --android-licenses
It will check for some documentation, you accept and then passes the tests:
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [Versione 10.0.18362.10006], locale it-IT)
• Flutter version 1.7.8+hotfix.3 at C:flutter
• Framework revision b712a172f9 (12 days ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:UsersedoardottAppDataLocalAndroidsdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.4)
• Android Studio at C:Program FilesAndroidAndroid Studio
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[!] IntelliJ IDEA Community Edition (version 2019.1)
• IntelliJ at C:Program FilesJetBrainsIntelliJ IDEA Community Edition 2019.1.3
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
i had the same problem. tried all of the above but didn't fix it. what i did is:
Please have backups before continuing, expecially sdkmanager partwent to Environment variables and added ANDROID_HOME with a variable value of:
C:\Users\%username%\AppData\Local\Android\Sdk
then myJAVA_HOME
with this variable value:
C:\Program Files\Android\Android Studio\jre
then myPath
with this variable value:
C:\Users\%username%\flutter\bin
Then I went to
C:\Users\%username%\AppData\Local\Android\Sdk\tools\bin
and openedsdkmanager.bat
with a note editor, this was myDEFAULT_JVM_OPTS
:@rem Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Dcom.android.sdklib.toolsdir=%~dp0\.."
Then i ran:
flutter doctor
got output of:Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale en-US) [!] Android toolchain - develop for Android devices (Android SDK 27.0.3) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [√] Android Studio (version 3.1) [√] Connected devices (1 available) ! Doctor found issues in 1 category.
Then i ran
flutter doctor --android-licenses
and accepted all Terms & Conditions with (y)This solved my problems. hope it helps you.
Thank you, it worked for me.
flutter doctor --android-licenses works for me
For OSX, this worked for me.
jdk
's I had in /Library/Java/JavaVirtualMachines/
and found jdk1.8.0_77.jdk/
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/"
to my ~/.bash_profile
and saved.echo $JAVA_HOME
flutter doctor --android-licenses
and accepted all licensesRunning flutter doctor
again showed no issues, finally!
I also had this issue.
On Windows:
open cmd and run:
android update sdk
After that run flutter doctor
again
hello,
the problem is in the version of Java, the sdk of flutter not support Java 10 ,so you need to down your version of Java to java 8.
I set the JAVA_HOME with the JRE in the Android studio and then flutter doctor --android-licenses just worked. For me, the JRE path was C:Program FilesAndroidAndroid Studiojre
This worked for me
Trying @Zedonboy's suggestion gave me some more problems...
flutter doctor --android-licenses A newer version of the Android SDK is required. To update, run: C:\Users\Caleb\AppData\Local\Android\sdk\tools\bin\sdkmanager --update
C:\Users\Caleb\AppData\Local\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:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) ... 5 more
I had the same issue, and it was solved when I downgraded java from java 13 to java 8.
in terminal set java 1.8 home path
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
then
try
/Users/mac/Library/Android/sdk/tools/bin/sdkmanager --update
Accept? (y/N): y
...
In order to fix this, I uninstalled JDK 13 that I had installed earlier, then :
flutter doctor --android-licenses
Hope this helps... ^_^
Important update
OpenJDK 10 was superseeded by OpenJDK 11, which doesn't implement
java.se.ee
_at all_. This means that the hack of adding--add-modules java.se.ee
doesn't do anything anymore. It also means that OpenJDK 10 will be automatically removed from your system and replaced with OpenJDK 11 the next time you update, if your updates are configured properly.To fix that, modify
sdkmanager
to use Java 8 by settingJAVA_HOME
_inside_sdkmanager
to a Java 8 installation. It's still, by default, at~/Android/Sdk/tools/bin/sdkmanager
.# Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options $ JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions'
@rem Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script. set JAVA_HOME="C:\ProgramData\scoop\apps\android-studio\current\jre" set DEFAULT_JVM_OPTS="-Dcom.android.sdklib.toolsdir=%~dp0\.."
This way, you can keep using a sane and maintained version of Java on your system while simultaneously using
sdkmanager
.# Java export JAVA_HOME=/usr/lib/jvm/default-java
And now I've got some pipelines to repair.
To fix that, modify
sdkmanager
to use Java 8 by settingJAVA_HOME
_inside_sdkmanager
to a Java 8 installation. It's still, by default, at~/Android/Sdk/tools/bin/sdkmanager
.
I am just starting up with all these things.
Can you please tell me how to modify sdkmanager
to use Java 8 by setting JAVA_HOME
inside sdkmanager
to a Java 8 installation. Like actually how to access JAVA_HOME
inside sdkmanager
since its a exec file.
update android sdk in android studio... It worked for me. because if you updated your flutter, it needs also the updated version of the sdk. for the environment to work properly
RESOLVED ,
before I use JDK 13 (newver) and found this issue sdk unknow , then I uninstall jdk 13 then install jdk 8 , update your variable JAVA_HOME , then restart your computer , then run flutter doctor ,
Microsoft Windows [Version 10.0.17763.973]
(c) 2018 Microsoft Corporation. All rights reserved.
C:Userskarmadi>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.17763.973], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 3.5)
[√] VS Code (version 1.41.1)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
C:Userskarmadi>flutter doctor --android-licenses
Warning: File C:Userskarmadi.androidrepositories.cfg could not be loaded.
6 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)? y
* and then will show more angreement you have to tap y
_until this message come out_
All SDK package licenses accepted
C:Userskarmadi>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.17763.973], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.41.1)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
I use sdkman
I can run flutter doctor --android-licenses
successfully after running the command below and set it to default
$ sdk install java 8.0.242.j9-adpt
Downloading: java 8.0.242.j9-adpt
In progress...
############################################################################################################### 100.0%############################################################################################################### 100.0%
Repackaging Java 8.0.242.j9-adpt...
Done repackaging...
Installing: java 8.0.242.j9-adpt
Done installing!
Do you want java 8.0.242.j9-adpt to be set as default? (Y/n):
Setting java 8.0.242.j9-adpt as default.
@NatoBoram I think locking this ticket is better if there is no need for it for the future.
Just run CMD as admin
I have accepted all the licences and suddenly they are 'forgotten'.....
Does anyone know how to solve this problem? Where does it come from? What is missing? What is the best way in 2020 to solve this problem?
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v1.15.3, on Microsoft Windows [version 10.0.18363.657], locale fr-FR)
[!] 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.5)
[√] Connected device (1 available)
flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:xxxxxtoolsbinsdkmanager --update
flutter doctor --android-licenses -v
A newer version of the Android SDK is required. To update, run:
C:xxxxxxtoolsbinsdkmanager --update
sdkmanager --update in a flutter app
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/X
mlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.
dule.java:156)
at com.android.repository.api.SchemaModule.
at com.android.sdklib.repository.AndroidSdkHandler.
java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73
sdkmanager --update in an android app
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.
at com.android.repository.api.SchemaModule.
at com.android.sdklib.repository.AndroidSdkHandler.
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
This is really a serious problem
@NatoBoram I think locking this ticket is better if there is no need for it for the future.
unfortunately it is not the case...
@benedicte69 Have you read through this thread and tried any solutions? Specifically, have you tried the solution listed here?
I set the JAVA_HOME with the JRE in the Android studio and then flutter doctor --android-licenses just worked. For me, the JRE path was C:Program FilesAndroidAndroid Studiojre
THANK YOU!!!!!!!
Congrats and many thanks @GuilhermeEsdras ! That is the most update answer I have read until now! For sure Gradlew will not complain about any bad JAVA_HOME that way.
It solved my android licenses (despite a wraning : .androidrepositories.cfg could not be loaded.)
please help me out...
thing happens with me is-
$ flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.17763.1098], locale en-IN)
• Flutter version 1.12.13+hotfix.8 at C:UsersasusDesktopflutter_windows_v1.12.13+hotfix.8-stableflutter
• Framework revision 0b8abb4724 (5 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.2)
• Android SDK at C:UsersasusAppDataLocalAndroidsdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-R, build-tools 29.0.2
• Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
• 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 FilesAndroidAndroid 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.43.0)
• VS Code at C:UsersasusAppDataLocalProgramsMicrosoft VS Code
• Flutter extension version 3.8.1
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
I have the same issue.
Just open android studio and get the sdk manager installed.
Rerun the flutter doctor. It will tell you to accept the unaccepted android licenses.
If you want to fix this problem then simply download Android Studio 3.5.2 from this link Download Android Studio 3.5.3 and then install it after removing the android studio that you have installed in your system. After installing it open it and do the same as you do with other android studio versions means install all the SDKs and just open cmd and hit flutter doctor
and now android studio license status unknown error fixed.
Thanks!
For those who are still facing the issue and if you have android studio installed then
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)
4. check it and apply and let the studio download the package
5. once done run the command flutter doctor and it should now prompt you to run flutter doctor --android-licenses once you run the license command accept all licenses by hitting y and it should solve the problem
for more detailed answer please see this answer https://stackoverflow.com/a/60705505/8253662 hope this helps
But I have android studio version 3.6
On Mon 16 Mar, 2020, 5:29 PM Mahesh Jamdade, notifications@github.com
wrote:
If nothing worked for you I would reommend you to follow this answer
https://stackoverflow.com/a/60705505/8253662 hope this helps—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/16025#issuecomment-599496856,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK7YA2CMUDIHJNR4CQTP2KTRHYIBTANCNFSM4EX3IR2Q
.
Have Android ASK (Obsolete)
Now
D:flutterbin>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:UserssunuwAppDataLocalAndroidsdktoolsbinsdkmanager --update
D:flutterbin>C:UserssunuwAppDataLocalAndroidsdktoolsbinsdkmanager --update
Warning: Could not create settings
java.lang.IllegalArgumentException
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.
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] [
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=
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.
I'm using this solution but looks like flutter still looking for android/tools directory
Tried to symlink the directory, doesn't work
If I'm install cmdtools with android/tools directory, it would give error like this
Warning: Could not create settings
java.lang.IllegalArgumentException
can somebody elaborate?
Android SDK Manager Tool is missing from new android studio build. !!!
Android SDK Manager Tool is missing from new android studio build. !!!
Go to Tools -> SDK Manager -> SDK Tools
Select & install SDK Tools
Just download CLI tools from developers site. And cut paste into sdk manager folder. And update your path and restart the system.. every thing will be fine. 🙂
Sent from Outlook Mobilehttps://aka.ms/blhgte
From: Levent Karakaş notifications@github.com
Sent: Friday, April 10, 2020 2:56:43 AM
To: flutter/flutter flutter@noreply.github.com
Cc: ibini thisisibini@outlook.com; Comment comment@noreply.github.com
Subject: Re: [flutter/flutter] ✗ Android license status unknown. (#16025)
Android SDK Manager Tool is missing from new android studio build. !!!
Go to Tools -> SDK Manager -> SDK Tools
Select & install SDK Tools
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fflutter%2Fflutter%2Fissues%2F16025%23issuecomment-611760484&data=02%7C01%7C%7C3eddcd888dc747ec0a5808d7dcccb3b8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637220644054715340&sdata=xETn0jgohGz0SgAiwgqWWUzegoqMxcNm6p%2FHsJre080%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJRW4S5LK6QRCEDO2CUU22DRLY4RHANCNFSM4EX3IR2Q&data=02%7C01%7C%7C3eddcd888dc747ec0a5808d7dcccb3b8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637220644054715340&sdata=TzISgosVl7pf4cfxpGrTlOXuBYlfJ0szFchL8hYC5Uc%3D&reserved=0.
Unsubscribe...
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Most helpful comment
Hi everyone,
type
$flutter doctor --android-licenses
It might say some licenses are not accepted(something like that)
you will be asked 'Do you want to review the licenses'?
type
y<press enter>
accept all the licenses review.
now check flutter again with
$flutter doctor