Skip to content

Conversation

@camsim99
Copy link
Contributor

@camsim99 camsim99 commented Aug 22, 2025

Description of what this PR is changing or adding, and why:
Adds a breaking change for flutter/flutter#168293 which landed in 3.35. TLDR: To set custom Android ABI filters, you must clear the defaults that Flutter sets or use the Flutter-provided flag for doing so.

Issues fixed by this PR (if any):
Fixes flutter/flutter#174004

PRs or commits this PR depends on (if any):
N/A

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented Aug 22, 2025

Visit the preview URL for this PR (updated for commit e82fe86):

https://flutter-docs-prod--pr12350-abi-filters-w5bhno49.web.app

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is in draft, but I reviewed it anyway. ;). I have a few tweaks over the word "may" but otherwise it looks great!

https://developers.google.com/style/word-list#may

@camsim99 camsim99 marked this pull request as ready for review August 25, 2025 18:45
@camsim99 camsim99 requested review from a team, antfitch and parlough as code owners August 25, 2025 18:45
@camsim99 camsim99 requested a review from gmackall August 25, 2025 18:46
@camsim99
Copy link
Contributor Author

camsim99 commented Aug 25, 2025

@gmackall Can you take a look to make sure this is right? Made this change instead of attempting to put it in the blog because this feels moreso like the right place, but let me know if you disagree. Thanks!

- `arm64-v8a`
- `x86_64`

Because this automatic configuration happens after your `build.gradle` files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly correct - the configuration happens before. It just breaks those who were depending on the set to be empty.

Previously, it would be. Now we add elements to it during configuration that happens before the user's build.gradle file. This is why clearing still works (otherwise it wouldn't matter what they wrote in their build.gradle at all).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh I see I see. Corrected "after" to "before"!

@gmackall
Copy link
Member

@gmackall Can you take a look to make sure this is right? Made this change instead of attempting to put it in the blog because this feels moreso like the right place, but let me know if you disagree. Thanks!

I think this is the right place as well, mostly looks good but one comment on the ordering of gradle configuration.

@angcyo
Copy link

angcyo commented Aug 26, 2025

Why does the flutter/flutter#174004 issue still exist on version 3.35.2

Flutter is already up to date on channel [user-branch]
Flutter 3.35.2 • channel [user-branch] • https://github.com/flutter/flutter.git
Framework • revision 05db968908 (9 小时前) • 2025-08-25 10:21:35 -0700
Engine • hash abb725c9a5211af2a862b83f74b7eaf2652db083 (revision a8bfdfc394) (3 days ago) • 2025-08-22 23:51:12.000Z
Tools • Dart 3.9.0 • DevTools 2.48.0

@camsim99
Copy link
Contributor Author

Why does the flutter/flutter#174004 issue still exist on version 3.35.2

Flutter is already up to date on channel [user-branch]
Flutter 3.35.2 • channel [user-branch] • https://github.com/flutter/flutter.git
Framework • revision 05db968908 (9 小时前) • 2025-08-25 10:21:35 -0700
Engine • hash abb725c9a5211af2a862b83f74b7eaf2652db083 (revision a8bfdfc394) (3 days ago) • 2025-08-22 23:51:12.000Z
Tools • Dart 3.9.0 • DevTools 2.48.0

@angcyo are you saying that the fix detailed here does not work for you on the latest stable?

Comment on lines 36 to 37
Because this automatic configuration happens before your `build.gradle` files
are processed, it might override custom `abiFilters` settings.
Copy link
Member

@gmackall gmackall Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would just say something more explicitly like this:

Suggested change
Because this automatic configuration happens before your `build.gradle` files
are processed, it might override custom `abiFilters` settings.
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.

I think the current structure could be confusing, as one would wonder something that happens before would override settings.

Copy link
Member

@gmackall gmackall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a nit for how I would prefer it but LGTM either way now

@camsim99 camsim99 merged commit 8569abd into main Aug 26, 2025
9 checks passed
@camsim99 camsim99 deleted the abi_filters branch August 26, 2025 22:46
@angcyo
Copy link

angcyo commented Aug 27, 2025

Why does the flutter/flutter#174004 issue still exist on version 3.35.2

Flutter is already up to date on channel [user-branch]
Flutter 3.35.2 • channel [user-branch] • https://github.com/flutter/flutter.git
Framework • revision 05db968908 (9 小时前) • 2025-08-25 10:21:35 -0700
Engine • hash abb725c9a5211af2a862b83f74b7eaf2652db083 (revision a8bfdfc394) (3 days ago) • 2025-08-22 23:51:12.000Z
Tools • Dart 3.9.0 • DevTools 2.48.0

@angcyo are you saying that the fix detailed here does not work for you on the latest stable?

Yes, I updated to 3.35.2, but it still didn't work.

I use flutter build apk --release to generate the apk.

Here is a minimum verification problem project : https://github.com/angcyo/flutter_abi_filters_demo

build.gradle.kts configuration as follows:

android {
    ...

    defaultConfig {
        ...
        ndk {
            //abiFilters.clear()
            //abiFilters.add("arm64-v8a")
            //abiFilters.add("armeabi-v7a")
            abiFilters.addAll(listOf("arm64-v8a", "armeabi-v7a"))
        }
    }
}

Is it a problem with the .kts file?

Is there no problem if build.gradle is used instead of build.gradle.kts?

I tried build.gradle, but there were also problems.

image

Should I reconsider merging my PR : flutter/flutter#174008

@camsim99
Copy link
Contributor Author

@angcyo Have you tried using abiFilters.clear()? That's part of the solution, but it's commented out in your code.

@angcyo
Copy link

angcyo commented Aug 28, 2025

@angcyo Have you tried using abiFilters.clear()? That's part of the solution, but it's commented out in your code.

I've tried everything, but the problem still exists.

@camsim99
Copy link
Contributor Author

@gmackall Do you know why this solution may not work in some cases? I took a look at the build.gradle files in https://github.com/angcyo/flutter_abi_filters_demo and nothing jumps out to me.

@angcyo
Copy link

angcyo commented Aug 30, 2025

@gmackall Do you know why this solution may not work in some cases? I took a look at the build.gradle files in https://github.com/angcyo/flutter_abi_filters_demo and nothing jumps out to me.

is there any progress?

@angcyo
Copy link

angcyo commented Sep 2, 2025

What's the situation now?

@RaadShariat
Copy link

RaadShariat commented Sep 2, 2025

@angcyo Have you tried using abiFilters.clear()? That's part of the solution, but it's commented out in your code.

I've tried everything, but the problem still exists.

@angcyo The migration guide is saying to set ABI filters in buildTypes, but you are doing it in defaultConfig. Maybe that's why?

@RaadShariat
Copy link

By the way, this migration guide here doesn't link to any pages.

Screenshot 2025-09-02 at 4 13 32 PM

@camsim99
Copy link
Contributor Author

camsim99 commented Sep 2, 2025

@RaadShariat thank you so much for pointing this out! Putting up a fix now: #12379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit the 3.35 blog to warn users that abiFilters is now set in Flutter apps

7 participants