I've been programming in Flutter using macOS 10.15.3, targeting iOS devices. Today I tried installing Android Studio also, to branch out. The installation went without errors, but in Library/Android/sdk/
there is no tools
subdirectory, which is a problem because sdkmanager
is supposed to be found within Library/Android/sdk/tools/bin
.
I noticed this because running flutter doctor
gave me:
✗ Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
I tried reinstalling Android Studio (no difference). Other solutions posted online talk about the Java version, so I upgraded the JRE from 1.7 to 1.8 and tried reinstalling Android Studio (no difference), and then upgraded JDK to the latest (so now the Java version is 11.0.6) and tried installing Android Studio again (no difference). I also upgraded Flutter to v1.12.13+hotfix.8 during the above, but this error won't go away.
If I type flutter doctor --android-licenses
then I get:
Android sdkmanager tool not found (/Users/macuser/Library/Android/sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.
This is how I first noticed that I'm missing part of Android Studio.
I tried cheating by creating a tools/bin
subdirectory myself and then copying sdkmanager
from a plugin's Library/Android/sdk/cmdline-tools/latest/bin
to my new Library/Android/sdk/tools/bin
. However, this didn't fool Flutter. Running flutter doctor --android-licenses
led to:
A newer version of the Android SDK is required. To update, run:
/Users/macuser/Library/Android/sdk/tools/bin/sdkmanager --update
This is wrong because the Android SDK is the newest.
Does anyone know why Android Studio would be consistently missing the tools/bin
subdirectory and the goodies inside? Thanks and sorry if I overlooked something basic.