Flutter
Windows10にインストール
code:console
$ cd ~/src
環境変数PATHに~/src/flutter/binを追加
flutter docterの実行
code:console
$ flutter doctor
Checking Dart SDK version... Downloading Dart SDK from Flutter engine ... Building flutter tool...
Running pub upgrade...
╔════════════════════════════════════════════════════════════════════════════╗
║ ║
║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
║ statistics and basic crash reports. This data is used to help improve ║
║ Flutter tools over time. ║
║ ║
║ Flutter tool analytics are not sent on the very first run. To disable ║
║ reporting, type 'flutter config --no-analytics'. To display the current ║
║ setting, type 'flutter config'. If you opt out of analytics, an opt-out ║
║ event will be sent, and then no further information will be sent by the ║
║ Flutter tool. ║
║ ║
║ By downloading the Flutter SDK, you agree to the Google Terms of Service. ║
║ Note: The Google Privacy Policy describes how data is handled in this ║
║ service. ║
║ ║
║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and ║
║ crash reports to Google. ║
║ ║
║ Read about data we send with crash reports: ║
║ ║
║ See Google's privacy policy: ║
╚════════════════════════════════════════════════════════════════════════════╝
Downloading Material fonts... 539ms
Downloading Gradle Wrapper... 161ms
Downloading package sky_engine... 281ms
Downloading flutter_patched_sdk tools... 1,310ms
Downloading flutter_patched_sdk_product tools... 1,453ms
Downloading windows-x64 tools... 2,736ms
Downloading windows-x64/font-subset tools... 437ms
Doctor summary (to see all details, run flutter doctor -v):
! Android toolchain - develop for Android devices (Android SDK version 29.0.2) ✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
✓ Chrome - develop for the web ✓ Android Studio (version 4.1.0) ✓ VS Code, 64-bit edition (version 1.53.2) ✓ Connected device (2 available) ! Doctor found issues in 1 category.
レポートをオフ
code:console
$ flutter config --no-analytics
Analytics reporting disabled.
You may need to restart any open editors for them to read new settings.
SDKラインセンスを承諾しようとするとNoClassDefFoundError
code:console
$ 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 SDK Command-line Toolをインストールする
再度実行
code:console
$ flutter doctor --android-licenses
5 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)? n
https://gyazo.com/2c6138f80de2f00030be1f25e760bcf5
2023/02/04時点のmasterチャネルで直っているのでとりあえずmasterチャネルで使えばエラーは消える
https://gyazo.com/988782401761e911fd6d2f78ba536791