出现以下警告
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
[!] Android Studio (version 3.4)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Community Edition (version 2019.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
按照提示执行: flutter doctor --android-licenses
接着提示:
A newer version of the Android SDK is required. To update, run:
/Users/username/Library/Android/sdk/tools/bin/sdkmanager --update
按照提示继续执行:/Users/username/Library/Android/sdk/tools/bin/sdkmanager --update
出现崩溃
Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModuleSchemaModuleVersion.<init>(SchemaModule.java:156)atcom.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)atcom.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)atcom.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:117)atcom.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:93)Causedby:java.lang.ClassNotFoundException:javax.xml.bind.annotation.XmlSchemaatjava.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)atjava.base/jdk.internal.loader.ClassLoadersSchemaModuleVersion.<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.SdkManagerCli.main(SdkManagerCli.java:117)
at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:93)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoadersSchemaModuleVersion.<init>(SchemaModule.java:156)atcom.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)atcom.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)atcom.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:117)atcom.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:93)Causedby:java.lang.ClassNotFoundException:javax.xml.bind.annotation.XmlSchemaatjava.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)atjava.base/jdk.internal.loader.ClassLoadersAppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 5 more
解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。
了解课程