Home > Back-end >  flutter doctor —android-licenses error : java.lang.UnsupportedClassVersionError
flutter doctor —android-licenses error : java.lang.UnsupportedClassVersionError

Time:02-06

When I write flutter doctor in terminal, Android license status unknown. this error appears. Someone said that if this error appears, you can use flutter doctor —android-licenses.

But, as I write flutter doctor --android-licenses, this new error appears java.lang.UnsupportedClassVersionError. I don't know how to do from this.. I found that this error will be appear when my mac java jdk version isn't matched to the file I compiled. But as I said I tried 1), 2). Then why still this error appears..?

This is my first question in stackoverflow and not an English speaker. If there's something displeased you, or something that's grammatically incorrect, I'm so sorry.

Thank you for your help in advance.

  1. I run this in M1 Mac OS (Ventura 13.0)
  2. I already installed java version 19.0.2, and I think this will be able to run the class file versions up to over 60.
  3. I set the PATH of flutter and java.

CodePudding user response:

  1. Install Android SDK Command-line Tools on android studio using the SDK manager

  2. Run flutter doctor --android-licenses

enter image description here

  • Related