
Error Description
This error indicates that the version of the Java Runtime Environment you are using is too old to recognize the class file version of the SdkManagerCli. This is a common issue when newer versions of tools require updated Java versions.
Solution:
Install Android SDK Command-line Tools 8.0:
Open Android Studio. Navigate to Tools > SDK Manager. In the SDK Manager, select the SDK Tools tab. Check the box for Android SDK Command-line Tools (latest). Click on the checkbox next to the Show Package Details at the bottom right. You should see a list of versions for the Android SDK Command-line Tools. Look for version 8.0 and select it. Apply the changes and install the selected version.
Navigate to the cmdline-tools Folder:
Open Windows Explorer. Navigate to the folder where the Android SDK is installed. This is typically located at
C:\Users\<USER_NAME>\AppData\Local\Android\Sdk\cmdline-tools
Replace <USER_NAME> with your actual Windows username.
Rename the Folder:
Locate the folder named 8.0.Right-click on the folder and select Rename. Rename the folder to latest.
Run Flutter Doctor:
Open a terminal or command prompt. Run the following command:
flutter doctor --android-licenses