Apparently not. I went through the steps to install flutter, including Android Studio.
However, flutter doctor
produced an issue:
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
I eventually found the path/to/sdkmanager, which was
/Users/<Mac User Name>/Library/Android/sdk/tools/bin/sdkmanager
but then running
/Users/<Mac User Name>/Library/Android/sdk/tools/bin/sdkmanager --install "cmdline-tools;latest"
produced the error:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Based on posts such as this page, I reluctantly started looking at installing Java. However, I found that Java is included in Android Studio, so I ran:
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home
but then
/Users/<Mac User Name>/Library/Android/sdk/tools/bin/sdkmanager --install "cmdline-tools;latest"
produced an exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
However, as indicated here: https://flutter-examples.com/flutter-command-line-tools-component-is-missing/ , the solution was to use Android Studio to install the Android sdk Command-line Tools (Latest).
Once I had done that, there was no longer a need to run --install "cmdline-tools;latest"
because the cmdline-tools;latest
had already been installed by Android Studio.
I was then able to run flutter doctor
and follow the instructions to get flutter doctor
to not identify any issues.
I would also note that Android Studio did not download the other sdk components until I actually created a project with Android Studio.
I was able to download an Android emulator and get the project to run on the emulator without installing Java except what came with Android Studio