Skip to content

[Android] [Deferred Components] Assets not packaged into module when building appbundle in release mode (Flutter 3.35.6) #177379

Description

@letanssang

Steps to reproduce

Description

When building an Android App Bundle with deferred components, the Dart code split works, but the declared assets are missing from the generated feature module (.aab).
Even though assets are correctly defined under the deferred-components section in pubspec.yaml, the resulting .aab does not contain them in the deferred module.
I got 2 component: code_asset_module with code + asset, and asset_only_module with assets only
Image

Expected results

The generated App Bundle should contain:

Deferred module with its assets

Actual results

The deferred Dart code is split correctly

However, the deferred module does not include any assets.

No errors or warnings during build.

Image

Code sample

Check my implementation here: https://github.com/letanssang/test_dynamic_module/pull/2/files

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Check flutter build appbundle -v log here: https://pastebin.com/hNk2aFjY

Flutter Doctor output

Doctor output
mac@MacBook-Pro-cua-Mac test_dynamic_module % flutter doctor -v
[✓] Flutter (Channel stable, 3.35.6, on macOS 15.2 24C101 darwin-arm64, locale en-VN) [496ms]
    • Flutter version 3.35.6 on channel stable at /Users/mac/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9f455d2486 (2 weeks ago), 2025-10-08 14:55:31 -0500
    • Engine revision d2913632a4
    • Dart version 3.9.2
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop,
      enable-android, enable-ios, cli-animations, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [2.1s]
    • Android SDK at /Users/mac/Library/Android/sdk
    • Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
    • Platform android-36, build-tools 36.1.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.8+-14018985-b1038.68)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [1,114ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [8ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.1) [8ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.8+-14018985-b1038.68)

[✓] VS Code (version 1.105.1) [7ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.120.0

[✓] Connected device (3 available) [6.3s]
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 14 (API 34) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 15.2 24C101 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 141.0.7390.122

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: assetsPackaging, accessing, or using assetsa: releaseChallenges faced when attempting to productionize an appfound in release: 3.35Found to occur in 3.35found in release: 3.38Found to occur in 3.38has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions