Flutterのエラー「Target aot_android_asset_bundle failed: IconTreeShakerException: Font subsetting failed with exit code -9.
」について紹介します。
エラーの意味
Target aot_android_asset_bundle failed: IconTreeShakerException: Font subsetting failed with exit code -9.
To disable icon tree shaking, pass --no-tree-shake-icons to the requested flutter build command
FAILURE: Build failed with an exception.
* Where:
Script '/Users/libs/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1201
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/libs/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 24s
Running Gradle task 'assembleRelease'... 24.8s
Gradle task assembleRelease failed with exit code 1
以下のコマンドでビルドすれば成功しました。
flutter build apk --no-tree-shake-icons
【Flutter超入門】使い方とサンプルアプリを解説
Flutterの使い方とサンプルアプリ(iOS、Android、Windows)について入門者向けに解説します。
コメント