Skip to content

[Android] reconfigure abiFilters not effect in productFlavors abiFilters #175845

@yiky84119

Description

@yiky84119

Steps to reproduce

/android/app/build.gradle.kts

flavorDimensions += listOf("device", "type")
productFlavors {
    create("te288") {
        dimension = "device"
        ndk {
            abiFilters.clear()
            abiFilters.addAll(listOf("arm64-v8a"))
        }
    }
    create("rk399") {
        dimension = "device"
        ndk {
            abiFilters.clear()
            abiFilters.addAll(listOf("armeabi-v7a"))
        }
    }
    create("uk392") {
        dimension = "device"
        ndk {
            abiFilters.clear()
            abiFilters.addAll(listOf("armeabi-v7a"))
        }
    }
    create("common") {
        dimension = "type"
    }
    create("fingerprint") {
        dimension = "type"
    }
}

Then run build:

flutter build apk --release --flavor te288Common

Expected results

The abi should only include arm64_v8a or armeabi-v7a

Actual results

Apk is still including "x86_64", "arm64_v8a" and "armeabi-v7a".

Image

Code sample

https://github.com/yiky84119/test1.git

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.35.4, on Microsoft Windows [版本 10.0.26100.6584], locale zh-CN)
[✓] Windows Version (Windows 11 or higher, 24H2, 2009)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    ✗ cmdline-tools component is missing.
      Try installing or updating Android Studio.
      Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure
      to set the ANDROID_HOME environment variable.
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/windows-android-setup for more details.
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.14)
[✓] Android Studio (version 2025.1.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2025.2)
[✓] Proxy Configuration
[✓] Connected device (3 available)
[✓] Network resources

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowfound in release: 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versiont: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions