Skip to content

[Android] reconfigure abiFilters not effect in buildTypes abiFilters #188009

Description

@Indekkusu545

Steps to reproduce

Upgrade flutter from 3.44.1 to 3.44.2

/android/app/build.gradle.kts

android.apply {
    flavorDimensions("flavor-type")

    productFlavors {
        create("development") {
            dimension = "flavor-type"
        }
        create("production") {
            dimension = "flavor-type"
        }
    }
}

buildTypes {
    debug {
        isDebuggable = true
    }
    release {
        isMinifyEnabled = true
        if (hasReleaseSigning) {
            signingConfig = signingConfigs.getByName("release")
        }
        ndk.abiFilters.clear()
        ndk.abiFilters.addAll(listOf("arm64-v8a"))
    }
}

Then run build:

flutter build apk --flavor development
# or
flutter build apk -Pdisable-abi-filtering --flavor development

Expected results

The abi should only include arm64_v8a

Actual results

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

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.44.2, on macOS 26.5.1 25F80 darwin-arm64, locale zh-Hans-CN) [531ms]
    • Flutter version 3.44.2 on channel stable at /opt/homebrew/share/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c9a6c48423 (4 天前), 2026-06-10 15:52:41 -0700
    • Engine revision 77e2e94772
    • Dart version 3.12.2
    • DevTools version 2.57.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios,
      cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging,
      enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,100ms]
    • Android SDK at /Users/0/Library/Android/sdk
    • Emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
    • Platform android-36, build-tools 36.1.0
    • ANDROID_HOME = /Users/0/Library/Android/sdk
    • Java binary at: /Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home/bin/java
      This JDK is specified by the JAVA_HOME environment variable.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Zulu21.50+19-CA (build 21.0.11+10-LTS)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 26.5) [936ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17F42
    ✗ Unable to get list of installed Simulator runtimes.
    • CocoaPods version 1.16.2

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

[!] Proxy Configuration [5ms]
    • HTTP_PROXY is set
    ! NO_PROXY is not set

[✓] Connected device (2 available) [5.9s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 26.5.1 25F80 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 149.0.7827.103

[✓] Network resources [1,172ms]
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: regressionIt was better in the past than it is nowhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    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