Problem is introduced into

A problem was detected when using the Flutter Doctor to check whether other dependencies need to be installed. The following errors are reported about the Android platform:

[Qualify] Android Toolchain - Develop for Android devices who can go onto university. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use `flutter config --android-sdk` to update to that location.Copy the code

1. Input:

flutter doctor --android-licenses

Error:

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
Copy the code

2, not over the wall of the computer first configure temporary mirror

PUB_HOSTED_URL			=	https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL	=	https://storage.flutter-io.cn
Copy the code

Install the Dart plugin for Flutter by default

4, Enter this command if the flutter doctor still returns an error

/ Users/username/Library/Android/SDK/tools/bin/sdkmanager - update

Tip:

The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Copy the code

This means having JRA software installed

5, Install JRA, open environment variable:

open -e .bash_profile

Input command view Java installation path: (can choose, if you know, I the results of the output/Library/Java/JavaVirtualMachines jdk1.8.0 _191. JDK/Contents/Home)

/usr/libexec/java_home -V

Enter the configuration environment content:

JAVA_HOME = "/ Library/Java/JavaVirtualMachines jdk1.8.0 _191. JDK/Contents/Home" PATH = "$JAVA_HOME/bin: $PATH." CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:. export JAVA_HOME export PATH export CLASSPATHCopy the code

Save:

source ~/.bash_profile

6. Finally:

flutter doctor --android-licenses

And it worked: