# Flutter now sets default `abiFilters` in Android builds

> The Flutter Gradle Plugin now automatically configures abiFilters for Android builds, which might break custom abiFilters settings.




:::important
These breaking change docs are accurate, as of the release
under which they are published. Over time, the
workarounds described here might become inaccurate.
We don't, in general, keep these breaking change docs up
to date as of each release.

The [breaking change index file](/release/breaking-changes)
lists the docs created for each release.
:::


## Summary

Starting in Flutter 3.35, the Flutter Gradle Plugin automatically sets
[`abiFilters`][] for Android builds to prevent the inclusion of unsupported
architectures in release APKs. This change can break custom
`abiFilters` specified in your app's `build.gradle` file.

## Context

This change was introduced to solve an issue where third-party
dependencies with x86 native libraries would cause Google Play to
incorrectly identify Flutter apps as supporting x86 devices. When users
with x86 devices installed these apps, they would crash at runtime
because Flutter's native libraries aren't available for x86.

The Flutter Gradle Plugin now automatically configures `abiFilters` to
include only the architectures that Flutter supports. This prevents
Google Play from making apps available to incompatible devices.

## Description of change

The Flutter Gradle Plugin now programmatically sets `abiFilters` for
non-debuggable builds when the `--splits-per-abi` option is not enabled
by default to:
- `armeabi-v7a`
- `arm64-v8a`
- `x86_64`

Because this automatic configuration happens before your `build.gradle` files
are processed, it might break custom `abiFilters` settings that depend on the
set being empty. Flutter can preserve `abiFilters` that you configure in
`defaultConfig`, but it can't safely preserve every `buildTypes` or
`productFlavors` ABI filter customization with the current Android Gradle
Plugin APIs.

## Migration guide
If your app doesn't customize `abiFilters`, no changes are required.

If your app needs to customize which architectures are included, you have
several options:

### Option 1: Use the splits-per-abi flag

If you want to control architecture inclusion, use Flutter's built-in
`--splits-per-abi` option instead of manually configuring `abiFilters`:

```console
flutter build apk --splits-per-abi
```

This creates separate APKs for each architecture and automatically disables
the automatic `abiFilters` configuration.

### Option 2: Configure abiFilters in defaultConfig

If you must use a single APK with custom architecture filters, clear the
automatically set filters and configure your own in `defaultConfig`.
For example:

```kotlin
android {
    defaultConfig {
        ndk {
            // Clear the automatically set filters.
            abiFilters.clear()
            // Set your custom filters.
            abiFilters.addAll(listOf("arm64-v8a"))
        }
    }
}
```

### Option 3: Disable Flutter's default ABI filtering

If your app configures ABI filters in `buildTypes` or `productFlavors`,
pass `-Pdisable-abi-filtering=true` when running `flutter build` or
`flutter run`. This prevents Flutter from applying its default ABI filters,
so your build type or product flavor configuration controls which
architectures are included.

## Timeline

Landed in version: 3.35.0<br>
In stable release: 3.35

Relevant issues:
* [Issue #174004](https://github.com/flutter/flutter/issues/174004)
* [Issue #153476](https://github.com/flutter/flutter/issues/153476)
* [Issue #175845](https://github.com/flutter/flutter/issues/175845)

Relevant PRs:
* [PR #168293](https://github.com/flutter/flutter/pull/168293)
* [PR #177753](https://github.com/flutter/flutter/pull/177753)

[`abiFilters`]: https://developer.android.com/reference/tools/gradle-api/8.7/com/android/build/api/dsl/Ndk#abiFilters()

