flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.75k stars 27.38k forks source link

"flutter build bundle --release" fails with `IconTreeShakerException` #81954

Closed 8bitter closed 3 years ago

8bitter commented 3 years ago

Steps to Reproduce

Note that this fails for flutter build bundle --profile too. Attempting to build bundles in release or profile modes also fail on a mac.

  1. flutter create flutter_counter
  2. cd flutter_counter
  3. flutter build bundle --verbose --release

Logs

Logs 20:25 $ flutter create flutter_counter Creating project flutter_counter... flutter_counter/.idea/modules.xml (created) flutter_counter/.idea/runConfigurations/main_dart.xml (created) flutter_counter/.idea/workspace.xml (created) flutter_counter/.idea/libraries/Dart_SDK.xml (created) flutter_counter/.idea/libraries/KotlinJavaRuntime.xml (created) flutter_counter/linux/main.cc (created) flutter_counter/linux/my_application.cc (created) flutter_counter/linux/CMakeLists.txt (created) flutter_counter/linux/.gitignore (created) flutter_counter/linux/my_application.h (created) flutter_counter/linux/flutter/CMakeLists.txt (created) flutter_counter/flutter_counter.iml (created) flutter_counter/lib/main.dart (created) flutter_counter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created) flutter_counter/ios/Runner.xcodeproj/project.pbxproj (created) flutter_counter/ios/Runner/AppDelegate.swift (created) flutter_counter/ios/Runner/Runner-Bridging-Header.h (created) flutter_counter/pubspec.yaml (created) flutter_counter/android/gradle/wrapper/gradle-wrapper.properties (created) flutter_counter/android/.gitignore (created) flutter_counter/android/gradle.properties (created) flutter_counter/android/settings.gradle (created) flutter_counter/android/app/src/profile/AndroidManifest.xml (created) flutter_counter/android/app/src/debug/AndroidManifest.xml (created) flutter_counter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created) flutter_counter/android/app/src/main/res/values/styles.xml (created) flutter_counter/android/app/src/main/res/drawable/launch_background.xml (created) flutter_counter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created) flutter_counter/android/app/src/main/res/values-night/styles.xml (created) flutter_counter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created) flutter_counter/android/app/src/main/res/drawable-v21/launch_background.xml (created) flutter_counter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created) flutter_counter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created) flutter_counter/android/app/src/main/AndroidManifest.xml (created) flutter_counter/android/build.gradle (created) flutter_counter/android/flutter_counter_android.iml (created) flutter_counter/android/app/src/main/kotlin/com/example/flutter_counter/MainActivity.kt (created) flutter_counter/android/app/build.gradle (created) flutter_counter/README.md (created) flutter_counter/.metadata (created) flutter_counter/test/widget_test.dart (created) flutter_counter/.gitignore (created) flutter_counter/web/icons/Icon-192.png (created) flutter_counter/web/icons/Icon-512.png (created) flutter_counter/web/manifest.json (created) flutter_counter/web/index.html (created) flutter_counter/web/favicon.png (created) flutter_counter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created) flutter_counter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created) flutter_counter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created) flutter_counter/ios/.gitignore (created) flutter_counter/ios/Flutter/AppFrameworkInfo.plist (created) flutter_counter/ios/Flutter/Release.xcconfig (created) flutter_counter/ios/Flutter/Debug.xcconfig (created) flutter_counter/ios/Runner/Info.plist (created) flutter_counter/ios/Runner/Base.lproj/LaunchScreen.storyboard (created) flutter_counter/ios/Runner/Base.lproj/Main.storyboard (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (created) flutter_counter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (created) flutter_counter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created) flutter_counter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (created) flutter_counter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created) flutter_counter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created) flutter_counter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (created) flutter_counter/ios/Runner.xcworkspace/contents.xcworkspacedata (created) flutter_counter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created) flutter_counter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created) Running "flutter pub get" in flutter_counter... 1,501ms Wrote 84 files. All done! In order to run your application, type: $ cd flutter_counter $ flutter run To enable null safety, type: $ cd flutter_counter $ dart migrate --apply-changes Your application code is in flutter_counter/lib/main.dart. ✔ ~/src 20:25 $ cd flutter_counter ✔ ~/src/flutter_counter 20:26 $ flutter build bundle --verbose --release [ +62 ms] executing: [/home/kkiyohara/src/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +26 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ ] executing: [/home/kkiyohara/src/flutter/] git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ +11 ms] Exit code 0 from: git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ ] 2.0.6 [ +32 ms] executing: [/home/kkiyohara/src/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/stable [ ] executing: [/home/kkiyohara/src/flutter/] git ls-remote --get-url origin [ +4 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +33 ms] executing: [/home/kkiyohara/src/flutter/] git rev-parse --abbrev-ref HEAD [ +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] stable [ +44 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +36 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +51 ms] Skipping pub get: version match. [ +100 ms] Generating /home/kkiyohara/src/flutter_counter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java [ +60 ms] 💪 Building with sound null safety 💪 [ +7 ms] Initializing file store [ +6 ms] release_flutter_bundle: Starting due to {} [ +97 ms] Persisting file store [ +1 ms] Done persisting file store [ +3 ms] Target release_flutter_bundle failed: IconTreeShakerException: Expected to find kernel file at /home/kkiyohara/src/flutter_counter/.dart_tool/flutter_build/303cf5f7e09bb2a84a7f5b70bcf010f9/app.dill, but no file found. To disable icon tree shaking, pass --no-tree-shake-icons to the requested flutter build command [ +10 ms] "flutter bundle" took 391ms. [ +2 ms] Failed to build bundle. [ ] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 buildWithAssemble (package:flutter_tools/src/bundle.dart:175:5) #2 BundleBuilder.build (package:flutter_tools/src/bundle.dart:102:5) #3 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:102:5) #4 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1157:12) #5 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1009:27) #6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #7 AppContext.run (package:flutter_tools/src/base/context.dart:149:12) #8 CommandRunner.runCommand (package:args/command_runner.dart:197:13) #9 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:278:9) #10 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #11 AppContext.run (package:flutter_tools/src/base/context.dart:149:12) #12 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5) #13 run.. (package:flutter_tools/runner.dart:64:9) #14 run. (package:flutter_tools/runner.dart:62:12) #15 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #16 AppContext.run (package:flutter_tools/src/base/context.dart:149:12) #17 runInContext (package:flutter_tools/src/context_runner.dart:73:10) #18 main (package:flutter_tools/executable.dart:90:3) [ +255 ms] ensureAnalyticsSent: 253ms [ +3 ms] Running shutdown hooks [ ] Shutdown hooks complete [ ] exiting with code 1 ✘-1 ~/src/flutter_counter 20:26 $ flutter build bundle --verbose --release --no-tree-shake-icons [ +54 ms] executing: [/home/kkiyohara/src/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +24 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ ] executing: [/home/kkiyohara/src/flutter/] git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ +11 ms] Exit code 0 from: git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ ] 2.0.6 [ +28 ms] executing: [/home/kkiyohara/src/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/stable [ ] executing: [/home/kkiyohara/src/flutter/] git ls-remote --get-url origin [ +4 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +28 ms] executing: [/home/kkiyohara/src/flutter/] git rev-parse --abbrev-ref HEAD [ +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] stable [ +39 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +31 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +44 ms] Skipping pub get: version match. [ +88 ms] Generating /home/kkiyohara/src/flutter_counter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java [ +43 ms] 💪 Building with sound null safety 💪 [ +6 ms] Initializing file store [ +6 ms] release_flutter_bundle: Starting due to {} [ +71 ms] release_flutter_bundle: Complete [ +35 ms] Persisting file store [ +1 ms] Done persisting file store [ +8 ms] "flutter bundle" took 354ms. [ +255 ms] ensureAnalyticsSent: 252ms [ +4 ms] Running shutdown hooks [ ] Shutdown hooks complete [ ] exiting with code 0 ✔ ~/src/flutter_counter 20:28 $ ls build/ flutter_assets/ snapshot_blob.bin.d ✔ ~/src/flutter_counter 20:28 $ ls build/flutter_assets/ AssetManifest.json FontManifest.json fonts/ .last_build_id NOTICES packages/ ✔ ~/src/flutter_counter 20:28 $ ✘-INT ~/src/flutter_counter ### Note that debug builds succeed. 20:30 $ flutter build bundle --verbose --debug [ +55 ms] executing: [/home/kkiyohara/src/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +24 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ ] executing: [/home/kkiyohara/src/flutter/] git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ +11 ms] Exit code 0 from: git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ ] 2.0.6 [ +28 ms] executing: [/home/kkiyohara/src/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/stable [ ] executing: [/home/kkiyohara/src/flutter/] git ls-remote --get-url origin [ +3 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +29 ms] executing: [/home/kkiyohara/src/flutter/] git rev-parse --abbrev-ref HEAD [ +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] stable [ +40 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +36 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +37 ms] Skipping pub get: version match. [ +90 ms] Generating /home/kkiyohara/src/flutter_counter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java [ +45 ms] 💪 Building with sound null safety 💪 [ +6 ms] Initializing file store [ +9 ms] Skipping target: gen_localizations [ +4 ms] kernel_snapshot: Starting due to {} [ +7 ms] /home/kkiyohara/src/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/kkiyohara/src/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root /home/kkiyohara/src/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages /home/kkiyohara/src/flutter_counter/.dart_tool/package_config.json --output-dill /home/kkiyohara/src/flutter_counter/.dart_tool/flutter_build/69ed6f97b36248922b461cd3c8a35496/app.dill --depfile /home/kkiyohara/src/flutter_counter/.dart_tool/flutter_build/69ed6f97b36248922b461cd3c8a35496/kernel_snapshot.d package:flutter_counter/main.dart [+5994 ms] kernel_snapshot: Complete [ +334 ms] copy_flutter_bundle: Starting due to {} [ +79 ms] copy_flutter_bundle: Complete [ +429 ms] Persisting file store [ +3 ms] Done persisting file store [ +10 ms] "flutter bundle" took 7,106ms. [ +73 ms] ensureAnalyticsSent: 70ms [ +4 ms] Running shutdown hooks [ ] Shutdown hooks complete [ +1 ms] exiting with code 0 ✔ ~/src/flutter_counter 20:31 $ ls build/flutter_assets/ AssetManifest.json FontManifest.json fonts isolate_snapshot_data kernel_blob.bin NOTICES packages vm_snapshot_data ✔ ~/src/flutter_counter 20:25 $ flutter doctor --verbose [✓] Flutter (Channel stable, 2.0.6, on Linux, locale en_US.UTF-8) • Flutter version 2.0.6 at /home/kkiyohara/src/flutter • Framework revision 1d9032c7e1 (6 days ago), 2021-04-29 17:37:58 -0700 • Engine revision 05e680e202 • Dart version 2.12.3 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /home/kkiyohara/Android/Sdk • Platform android-30, build-tools 30.0.2 • Java binary at: /usr/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at google-chrome [✓] Linux toolchain - develop for Linux desktop • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) • cmake version 3.18.4 • ninja version 1.8.2 • pkg-config version 0.29.1 [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions). [✓] IntelliJ IDEA Ultimate Edition (version 2021.1) • IntelliJ at /home/kkiyohara/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/211.7142.45 • Flutter plugin version 56.0.5 • Dart plugin version 211.7233 [✓] Connected device (2 available) • Linux (desktop) • linux • linux-x64 • Linux • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93 ! Doctor found issues in 1 category.
Russiarain commented 3 years ago

I think you may forget to reference your release keystore in the android project, see signing the app.

darshankawar commented 3 years ago

bundle Build the Flutter assets directory from your app.

[   +3 ms] Target release_flutter_bundle failed: IconTreeShakerException:
Expected to find
           kernel file at

/Users/dhs/Documents/NCFlutter/bug_81954/.dart_tool/flutter_build/c2a3b3712c4a9f
           dc1e8045472f13100a/app.dill, but no file found.

           To disable icon tree shaking, pass --no-tree-shake-icons to the
requested
           flutter build command

Verified this on latest stable and master and I see the same exception in profile and release mode, while it works in debug mode.

flutter build bundle --release --verbose ``` dhs@Dhss-MacBook-Pro bug_81954 % flutter build bundle --verbose --release [ +75 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +49 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ +3 ms] 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ +1 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ +21 ms] Exit code 0 from: git tag --points-at 1d9032c7e1d867f071f2277eb1673e8f9b0274e3 [ ] 2.0.6 [ +45 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +12 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/stable [ ] executing: [/Users/dhs/documents/fluttersdk/flutter/] git ls-remote --get-url origin [ +11 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +47 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git rev-parse --abbrev-ref HEAD [ +12 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] stable [ +5 ms] executing: sw_vers -productName [ +13 ms] Exit code 0 from: sw_vers -productName [ ] Mac OS X [ ] executing: sw_vers -productVersion [ +13 ms] Exit code 0 from: sw_vers -productVersion [ ] 10.15.4 [ ] executing: sw_vers -buildVersion [ +14 ms] Exit code 0 from: sw_vers -buildVersion [ ] 19E2269 [ +5 ms] executing: sysctl hw.optional.arm64 [ +4 ms] Exit code 1 from: sysctl hw.optional.arm64 [ ] sysctl: unknown oid 'hw.optional.arm64' [ +59 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +38 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +49 ms] Skipping pub get: version match. [ +124 ms] Generating /Users/dhs/Documents/NCFlutter/bug_81954/android/app/src/main/java/io/flutter/pl ugins/GeneratedPluginRegistrant.java [ +69 ms] 💪 Building with sound null safety 💪 [ +8 ms] Initializing file store [ +8 ms] release_flutter_bundle: Starting due to {} [ +107 ms] Persisting file store [ +2 ms] Done persisting file store [ +2 ms] Target release_flutter_bundle failed: IconTreeShakerException: Expected to find kernel file at /Users/dhs/Documents/NCFlutter/bug_81954/.dart_tool/flutter_build/303cf5f7e09bb2 a84a7f5b70bcf010f9/app.dill, but no file found. To disable icon tree shaking, pass --no-tree-shake-icons to the requested flutter build command [ +12 ms] "flutter bundle" took 456ms. [ +4 ms] Failed to build bundle. [ +1 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 buildWithAssemble (package:flutter_tools/src/bundle.dart:175:5) #2 BundleBuilder.build (package:flutter_tools/src/bundle.dart:102:5) #3 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:102:5) #4 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1157:12) #5 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1009:27) #6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #7 AppContext.run (package:flutter_tools/src/base/context.dart:149:12) #8 CommandRunner.runCommand (package:args/command_runner.dart:197:13) #9 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:278:9) #10 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #11 AppContext.run (package:flutter_tools/src/base/context.dart:149:12) #12 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5) #13 run.. (package:flutter_tools/runner.dart:64:9) #14 run. (package:flutter_tools/runner.dart:62:12) #15 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #16 AppContext.run (package:flutter_tools/src/base/context.dart:149:12) #17 runInContext (package:flutter_tools/src/context_runner.dart:73:10) #18 main (package:flutter_tools/executable.dart:90:3) [ +264 ms] ensureAnalyticsSent: 261ms [ +3 ms] Running shutdown hooks [ ] Shutdown hooks complete [ +1 ms] exiting with code 1 dhs@Dhss-MacBook-Pro bug_81954 % ```
flutter build bundle --debug --verbose ``` dhs@Dhss-MacBook-Pro bug_81954 % flutter build bundle --debug --verbose [ +90 ms] executing: sysctl hw.optional.arm64 [ +16 ms] Exit code 1 from: sysctl hw.optional.arm64 [ ] sysctl: unknown oid 'hw.optional.arm64' [ +6 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +16 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 14d5eab43c37d59c6ba56576a238633e75ad924b [ ] executing: [/Users/dhs/documents/fluttersdk/flutter/] git tag --points-at 14d5eab43c37d59c6ba56576a238633e75ad924b [ +22 ms] Exit code 0 from: git tag --points-at 14d5eab43c37d59c6ba56576a238633e75ad924b [ +2 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git describe --match *.*.* --long --tags 14d5eab43c37d59c6ba56576a238633e75ad924b [ +25 ms] Exit code 0 from: git describe --match *.*.* --long --tags 14d5eab43c37d59c6ba56576a238633e75ad924b [ ] 2.3.0-0.0.pre-229-g14d5eab43c [ +7 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +12 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/master [ ] executing: [/Users/dhs/documents/fluttersdk/flutter/] git ls-remote --get-url origin [ +10 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +95 ms] executing: [/Users/dhs/documents/fluttersdk/flutter/] git rev-parse --abbrev-ref HEAD [ +11 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] master [ +4 ms] executing: sw_vers -productName [ +12 ms] Exit code 0 from: sw_vers -productName [ ] Mac OS X [ ] executing: sw_vers -productVersion [ +13 ms] Exit code 0 from: sw_vers -productVersion [ ] 10.15.4 [ ] executing: sw_vers -buildVersion [ +14 ms] Exit code 0 from: sw_vers -buildVersion [ ] 19E2269 [ +59 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +38 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +49 ms] Skipping pub get: version match. [ +113 ms] Generating /Users/dhs/Documents/NCFlutter/bug_81954/android/app/src/main/java/io/flutter/pl ugins/GeneratedPluginRegistrant.java [ +71 ms] 💪 Building with sound null safety 💪 [ +6 ms] Initializing file store [ +15 ms] Skipping target: gen_localizations [ +12 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /Users/dhs/Documents/NCFlutter/bug_81954/.dart_tool/package_config_subset} [ +29 ms] gen_dart_plugin_registrant: Complete [ +1 ms] kernel_snapshot: Starting due to {} [ +9 ms] /Users/dhs/documents/fluttersdk/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /Users/dhs/documents/fluttersdk/flutter/bin/cache/artifacts/engine/darwin-x64/fr ontend_server.dart.snapshot --sdk-root /Users/dhs/documents/fluttersdk/flutter/bin/cache/artifacts/engine/common/flutte r_patched_sdk/ --target=flutter --no-print-incremental-dependencies -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages /Users/dhs/Documents/NCFlutter/bug_81954/.dart_tool/package_config.json --output-dill /Users/dhs/Documents/NCFlutter/bug_81954/.dart_tool/flutter_build/0c585f7d232dfd 6e5df0e5b52d3eee90/app.dill --depfile /Users/dhs/Documents/NCFlutter/bug_81954/.dart_tool/flutter_build/0c585f7d232dfd 6e5df0e5b52d3eee90/kernel_snapshot.d --filesystem-scheme org-dartlang-root package:bug_81954/main.dart [+7606 ms] kernel_snapshot: Complete [ +402 ms] copy_flutter_bundle: Starting due to {} [ +142 ms] copy_flutter_bundle: Complete [ +498 ms] Persisting file store [ +5 ms] Done persisting file store [ +16 ms] "flutter bundle" took 9,054ms. [ +264 ms] ensureAnalyticsSent: 257ms [ +3 ms] Running shutdown hooks [ ] Shutdown hooks complete [ ] exiting with code 0 dhs@Dhss-MacBook-Pro bug_81954 % ```
stable and master flutter doctor -v ``` [✓] Flutter (Channel stable, 2.0.6, on Mac OS X 10.15.4 19E2269 darwin-x64, locale en-GB) • Flutter version 2.0.6 at /Users/dhs/documents/fluttersdk/flutter • Framework revision 1d9032c7e1 (6 days ago), 2021-04-29 17:37:58 -0700 • Engine revision 05e680e202 • Dart version 2.12.3 [!] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.3, Build version 12C33 ! CocoaPods 1.9.3 out of date (1.10.0 is recommended). CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] VS Code (version 1.55.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.21.0 [✓] Connected device (3 available) • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93 ! Doctor found issues in 1 category. [✓] Flutter (Channel master, 2.3.0-1.0.pre.229, on Mac OS X 10.15.4 19E2269 darwin-x64, locale en-GB) • Flutter version 2.3.0-1.0.pre.229 at /Users/dhs/documents/fluttersdk/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 14d5eab43c (5 hours ago), 2021-05-05 21:51:53 -0700 • Engine revision 378e4dbc41 • Dart version 2.14.0 (build 2.14.0-48.0.dev) [!] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.3, Build version 12C33 ! CocoaPods 1.9.3 out of date (1.10.0 is recommended). CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] VS Code (version 1.55.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.21.0 [✓] Connected device (3 available) • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93 ! Doctor found issues in 1 category. ```
8bitter commented 3 years ago

We aren't trying to build for Android. We are using a separate Flutter engine running on a different platform. We just need the bundle files.

On Wed, May 5, 2021 at 11:02 PM Frank Pang @.***> wrote:

I think you may forget to reference your release keystore in the android project, see signing the app https://flutter.dev/docs/deployment/android#signing-the-app.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flutter/flutter/issues/81954#issuecomment-833250746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXXJY46TXKN44QUGNJMVYDTMIWIPANCNFSM44GGV7HA .

jmagman commented 3 years ago

The flutter assemble equivalent from flutter build apk --release -v has flags -Pverbose=true -Ptarget-platform=android-arm,android-arm64,android-x64 -Ptarget=lib/main.dart -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=true assembleRelease

jmagman commented 3 years ago

flutter build bundle --release --no-tree-shake-icons succeeded.

jmagman commented 3 years ago

@jonahwilliams says flutter build bundle doesn't generate a dill, just the assets, so there's nothing for the icon tree shaker to run on. We should remove it the flag for that command (probably not actually remove since that would break --no-tree-shake-icons, but default it to off and hide it).

In the meantime, the workaround is to run flutter build bundle --release --no-tree-shake-icons.

8bitter commented 3 years ago

Here's a session that is building DEBUG version of the bundle. Take note of the bundle/flutter_assets/ directory contents after building, i.e. the vm_snapshot_data, isolate_snapshot_data and kernel_blob.bin files:

✔ ~/src/flutter_counter 
21:10 $ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.6, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.
✔ ~/src/flutter_counter 
21:10 $ flutter clean
Deleting build...                                                    4ms
Deleting .dart_tool...                                               0ms
Deleting .packages...                                                0ms
Deleting Generated.xcconfig...                                       0ms
Deleting flutter_export_environment.sh...                            0ms
✔ ~/src/flutter_counter 
21:10 $ flutter build bundle --debug
Running "flutter pub get" in flutter_counter...                    463ms

💪 Building with sound null safety 💪

✔ ~/src/flutter_counter 
21:10 $ ls -l build/flutter_assets/
total 37800
-rw-rw-r-- 1 kkiyohara kkiyohara      109 May 17 21:10 AssetManifest.json
-rw-rw-r-- 1 kkiyohara kkiyohara      208 May 17 21:10 FontManifest.json
drwxrwxr-x 2 kkiyohara kkiyohara     4096 May 17 21:10 fonts
-rw-rw-r-- 1 kkiyohara kkiyohara  4075041 May 17 21:10 isolate_snapshot_data
-rw-rw-r-- 1 kkiyohara kkiyohara 33844464 May 17 21:10 kernel_blob.bin
-rw-rw-r-- 1 kkiyohara kkiyohara   751388 May 17 21:10 NOTICES
drwxrwxr-x 3 kkiyohara kkiyohara     4096 May 17 21:10 packages
-rw-rw-r-- 1 kkiyohara kkiyohara    11204 May 17 21:10 vm_snapshot_data
✔ ~/src/flutter_counter 
21:10 $ 

Attempting to build a RELEASE bundle ends up with missing files:

✔ ~/src/flutter_counter 
21:10 $ flutter clean
Deleting build...                                                    7ms
Deleting .dart_tool...                                               2ms
Deleting .packages...                                                0ms
Deleting Generated.xcconfig...                                       0ms
Deleting flutter_export_environment.sh...                            0ms
✔ ~/src/flutter_counter 
21:15 $ flutter build bundle --release --no-tree-shake-icons 
Running "flutter pub get" in flutter_counter...                    443ms

💪 Building with sound null safety 💪

✔ ~/src/flutter_counter 
21:16 $ ls -l build/flutter_assets/
total 752
-rw-rw-r-- 1 kkiyohara kkiyohara    109 May 17 21:16 AssetManifest.json
-rw-rw-r-- 1 kkiyohara kkiyohara    208 May 17 21:16 FontManifest.json
drwxrwxr-x 2 kkiyohara kkiyohara   4096 May 17 21:16 fonts
-rw-rw-r-- 1 kkiyohara kkiyohara 751388 May 17 21:16 NOTICES
drwxrwxr-x 3 kkiyohara kkiyohara   4096 May 17 21:16 packages
✔ ~/src/flutter_counter 
21:16 $ 
jmagman commented 3 years ago

i.e. the vm_snapshot_data, isolate_snapshot_data and kernel_blob.bin files

Those are present in debug, not release, so that's behaving correctly. That's not related to the icon tree shaking looking for the dill that isn't being output.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.