'C:\Users\lenovo>flutter doctor --android-licenses Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli''
I have set environment parameter.
Even installed AndroidSdkTools(obsolete) here is a log of flutter doctor.
C:\Users\lenovo>flutter doctor -v) [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at C:\Users\lenovo\AppData\Local\Android\sdk • Platform android-29, build-tools 29.0.3 • Java binary at: C:\Program Files\Android\Android Studio2\jre\bin\java • 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 visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions. ! Doctor found issues in 1 category.'''
Solution 1: Kostas
I just managed to resolve the same issue, here is what worked for me:
- Go to File - Settings - System Settings - Android SDK
- Select the "SDK Tools" tab
- Here is the tricky part: for most people with the same problem on the web, you simply need to uncheck the "Hide Obsolete Packages" option on the bottom right corner Screenshot 1. Then, an "Android SDK Tools (Obsolete)" option will appear Screenshot 2. Check it, click Apply and then OK. Now, you will be able to run "flutter doctor --android-licenses"
- For me, number 3 did not work, as the obsolete option did not appear. So I uninstalled the "Android SDK Tools" version which was already installed, the non-obsolete (just unchecked it, clicked apply, etc.). After that, unchecking the "Hide Obsolete Packages" option on the bottom right corner made the "Android SDK Tools (Obsolete)" appear.
Unfortunately, I did not take a screenshot of the last process and now I cannot reproduce it. Generally, the steps above were a bit "trial and error" and included reinstalling Android Studio at some point or installing the "Android SDK Command-line Tools", but I am not sure about their effect.
edit: Sorry, did not see you mentioned that you already installed the obsolete sdk tools, so my answer is not really useful...