Update 1 (2020-02-29)
Seems like latest version of Android SDK renamed the 'Android SDK tools' package into 'Android-SDK command line tools'.
But unfortunately current stable version of the Flutter SDK (v1.12.13+hotfix.8
) is not compatible with this change and it keeps showing error message.
Workaround:
As @Mark Ebden suggested, You can simply Uncheck Hide Obsolete Packages checkbox on the SDK tools page and you'll see Android SDK Tools (Obsolete) 26.1.1. Install it and you are good to go. If you find anything missing, read the following detailed instructions.
See this issue on flutter repo for more info.
Here is the complete details you want while installing android studio with latest version of Mac OS.
1. Install Android Studio stable version.
2. Open android studio
3. open SDK manager. See the screen shot below.
4. Make sure you have downloaded all required stuff. See the screenshots below.
Please note that, I am using a custom location (/Users/darish/development/sdk/android) for my Android SDK instead of the default location (Library/Android/sdk/)
5. Go to your home directory and check whether there is a .bash_profile or not. If yes, open it, if no, create one. Add the following contents to that file.
export PATH="$PATH:~/development/sdk/flutter/bin"
export ANDROID_HOME="/Users/darish/development/sdk/android"
export PATH="$PATH:$ANDROID_HOME/platform-tools"
6. Once all the above steps are done, run flutter doctor --android-licenses and accept all licenses.
flutter doctor --android-licenses
7. Now run flutter doctor to see everything ok. If you need any further assistance, let me know. :)
That's all, have a nice day :)
I'm facing the same issue too on MacOS.
I just downloaded the Android Studio today (android-studio-ide-192.6241897-mac) and the /tools folder is missing for me too.
The only way I can see an 'sdkmanager' inside the 'Android/' directory is when I install cmdline-tools and find it in the bin folder. but that doesn't solve the problem.
EDIT
Found the solution.
Apparently, the 'tools/' folder doesn't exist in the latest Android Studion build.
You can still install the SDK tools using the SDK manager in the Android studio.
Open the SDK manager and go to the 'SDK Tools' tab. On the bottom uncheck the 'Hide Obsolete packages' checkbox.
After doing that an option to install the 'Android SDK Tools (obsolete)' package will appear.
Install them and run the flutter doctor
again.
And it works after accepting the licenses
Best Answer
Open the
sdkmanager.bat
in a text editor and addecho %CLASSPATH%
just below theCLASSPATH=%APP_HOME%\...\sdkmanager-classpath.jar
. Then runsdkmanager --help
which will echo the CLASSPATH of the required file. And check whether is it the valid path.In my case, it was the wrong path,
It said my
sdkmanger-classpath.jar
is inlib
folder. But it was not! It was actually inside thelib/_
folder. So as the simple solution what I did was copy the content in sidelib/_
folder tolib
. Then it worked fine!