I have just try to execute below command in Android Studio Terminal:
flutter doctor --android-licenses
and getting below error:
Error: LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
What might be the issue? and How can resolve this?
The (class file version 61.0) is JDK 17. Upgrade your JDK to 17 and make sure it is on your PATH using
java --versionon a new terminal or after reloading env variables.