Skip to content

Explicitly set ndkVersion to Flutter's#247

Merged
HamdaanAliQuatil merged 1 commit intogoogle:masterfrom
emersion:set-ndk-version
Feb 10, 2026
Merged

Explicitly set ndkVersion to Flutter's#247
HamdaanAliQuatil merged 1 commit intogoogle:masterfrom
emersion:set-ndk-version

Conversation

@emersion
Copy link
Copy Markdown
Contributor

@emersion emersion commented Jan 27, 2026

Without this, webcrypto.dart uses AGP's default NDK version, which can be different from Flutter's preferred NDK version. Apart from causing builds to download multiple NDKs needlessly, this also causes APKs to not use 16 KB page sizes.

Tested by building an APK and opening it in Android Studio's APK analyzer.

Closes: #239

Without this, webcrypto.dart uses AGP's default NDK version, which
can be different from Flutter's preferred NDK version. Apart from
causing builds to download multiple NDKs needlessly, this also
causes APKs to not use 16 KB page sizes.

Tested by building an APK and opening it in Android Studio's APK
analyzer.
@delthas
Copy link
Copy Markdown

delthas commented Jan 27, 2026

I was actually writing the same patch but you were first 😛

Copy link
Copy Markdown
Collaborator

@HamdaanAliQuatil HamdaanAliQuatil left a comment

Choose a reason for hiding this comment

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

thanks for this 🚀

delthas added a commit to irctoday/goguma that referenced this pull request Feb 8, 2026
@HamdaanAliQuatil HamdaanAliQuatil merged commit dcc7ba7 into google:master Feb 10, 2026
12 of 15 checks passed
delthas added a commit to irctoday/goguma that referenced this pull request Mar 16, 2026
Use upstream master instead of a fork, since the PR has been merged.

See: google/webcrypto.dart#247
@emersion emersion deleted the set-ndk-version branch March 19, 2026 15:36
@emersion
Copy link
Copy Markdown
Contributor Author

@jonasfj If you have time, it would be great to have a new release with this fix!

dani-weiss added a commit to dani-weiss/webcrypto.dart that referenced this pull request Apr 14, 2026
…for play console publishing. Backport of google#247 onto the 0.6.0 tag
@emersion
Copy link
Copy Markdown
Contributor Author

@jonasfj Gentle ping, would be nice to have this available on the published package - this is blocking Google Play submissions for all Flutter apps using this library :P

@olof-dev
Copy link
Copy Markdown

Can confirm that this fixed the issue for me: the check_elf_alignment.sh script (see https://developer.android.com/guide/practices/page-sizes) reports
lib/arm64-v8a/libwebcrypto.so: ALIGNED (2**14)
after this change, instead of the UNALIGNED (2**12) without the fix. As @emersion writes, Google Play Console flags a policy violation if it is unaligned, so an updated release on pub.dev would be very welcome.

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.

Current version 0.6.0 is not compatible with 16 KB memory page

5 participants