Android licenses in Flutter

Viewed 4653

Everything was working fine 4 days ago - I did an update and the licenses stopped going through... what I did so far.

  1. the tools obsolete thing is checked -> does not work
  2. flutter doctor --android-licenses -> does not work
  3. sdkmanager --licenses -> did not work
  4. uninstall and reinstall android at least 3 times -> did not work
  5. downloaded manually cmdline-tools folder and put in the Sdk folder -> did not work
  6. delete folder tools and replaced with new one -> did not work

flutter doctor

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) X Android license status unknown.

flutter doctor --android-licenses

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema

Flutter 1.17.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision e6b34c2b5c (7 days ago) • 2020-05-02 11:39:18 -0700 Engine • revision 540786dd51 Tools • Dart 2.8.1

$ java --version openjdk 11.0.7 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)

Android Studio 3.6.3

2 Answers

I encountered the same problem just recently. I solved mine with the ANDROID_HOME path in the Environment Variables.

enter image description here

my solution for the licenses - after 6 days... uninstall everything JAVA AS WELL. then reinstall javaSE (jdk8) and reinstall everything openJDK11 as JAVA_home path. flutter doctor will ask you to do --android-license .

Related