Download flutter_macos_2.2.0-stable.zip from https://flutter.dev/docs/get-started/install/macos
1 | β― flutter doctor |
From the above error you can see that Android studio and XCode are required and the links to download are provide. Download both of them and try running flutter doctor
again.
Accepting android licenses1
2
3
4
5
6
7
8
9
10
11
12
13~/dev/startup_namer
β― flutter doctor --android-licenses
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
Android Studio doesnβt install Android Command Line tools by default. Follow the screenshots below:
Now rerunning flutter doctor --android-licenses
doesnβt throw any exception.