Steps to reproduce
- Declare multi-flavor asset directories in
pubspec.yaml:
flutter:
assets:
- path: assets/flavour1/
flavors: [flavour1]
- path: assets/flavour2/
flavors: [flavour2]
- path: assets/flavour3/
flavors: [flavour3]
- path: assets/flavour4/
flavors: [flavour4]
- Place at least one file inside each directory (placeholder, image, SVG, ...).
- Build a single flavor:
flutter build apk --flavor flavour1
Actual results
Starting in Flutter 3.44, the build logs, at default verbosity, one warning per file in every non-active flavor directory:
Skipping assets entry "assets/flavour2/<file>" since its configured flavor(s) did not match the provided flavor (if any).
Configured flavors: flavour2
Skipping assets entry "assets/flavour3/<file>" since its configured flavor(s) did not match the provided flavor (if any).
Configured flavors: flavour3
Skipping assets entry "assets/flavour4/<file>" since its configured flavor(s) did not match the provided flavor (if any).
Configured flavors: flavour4
This scales linearly with the number of files across inactive flavor directories. Hundreds of files → hundreds of warning lines on every build.
Expected results
Skipping is the documented, declared, intended behavior. From the Flutter flavor asset bundling docs:
If you have assets that are only used in a specific flavor in your app, you can configure them to only be bundled into your app when launching that flavor.
The message restates exactly that configuration back to the developer; it isn't actionable. Suggested options:
- Drop entirely.
- Demote to
-v / verbose only.
- Collapse to one line per directory rather than per file.
Flutter doctor
- Introduced in Flutter 3.44 (not present in 3.41.x).
- Reproducible on Android and iOS (
--flavor is not supported on web).
Steps to reproduce
pubspec.yaml:flutter build apk --flavor flavour1Actual results
Starting in Flutter 3.44, the build logs, at default verbosity, one warning per file in every non-active flavor directory:
This scales linearly with the number of files across inactive flavor directories. Hundreds of files → hundreds of warning lines on every build.
Expected results
Skipping is the documented, declared, intended behavior. From the Flutter flavor asset bundling docs:
The message restates exactly that configuration back to the developer; it isn't actionable. Suggested options:
-v/ verbose only.Flutter doctor
--flavoris not supported on web).