【Flutter】「Target aot_android_asset_bundle failed: IconTreeShakerException: Font subsetting failed with exit code -9.」の意味と対策

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入門】iOS、Android、Windowsアプリ開発
FlutterによるiOS、Android、Windowsアプリ開発について入門者向けに紹介します。
flutter
スポンサーリンク

コメント