If you face an issue with the ” android sdkmanager command not found error” in flutter then you are in the right place. In this article, we will solve this error “sdkmanager command not found”. The error may look like this:
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.
This kind of error you may be found in Windows OS or MAC Os or Linux OS. It doesn’t matter from which OS version you face this issue. We will solve this issue for all OS.
This issue happens for the missing Android SDK Tools and Android SDK Command-line Tools on SDK manager. In that case, if you don’t have the Android SDK then you have to install it.
How to Solve Android sdkmanager Command Not Found Error in Flutter
Open SDK Manager in Android Studio:
At first open the SDK manager on Android Studio by following images:
Click the three dots > SDK Manager.
Or if you already open the android studio project then:
Install Android SDK Tools and Android SDK Command-line Tools:
Now you have open the Android studio. Now uncheck the option named Hide Obsolete Packages. Then go to Tools > SDK Manager > SDK Tools tab. Now install Android SDK Tools and Android SDK Command-line Tools.
Now, it’s time to check the command “flutter doctor –android-licenses” in your terminal to check if the error still occur or not. If you still face the issue sdkmanager command not found flutter then go to this path: C:\Users\user_name\AppData\Local\Android\Sdk\cmdline-tools and check if it has latest file.
If you have more than the latest file like latest-2 or like this then delete the latest file and rename latest-2 to latest. When android download multiple SDK or new SDK then it automatically creates the name latest-2 or like this. So if you want to delete the old file then you have to delete the old latest file and rename the current latest 2 to latest.
In this way, we can solve the android sdkmanager command not found error.
Read More: