79741685

Date: 2025-08-20 23:33:21
Score: 1
Natty:
Report link

Some .so library files in the command output are 2**12 == 4KB aligned. So, the message that ELF alignment check failed.

Please check this link for detailed answer. I am posting a summary of what you need to do here:

Steps to support 16KB page alignment in Flutter app: (First of all create a backup of your original project, and try the following steps in a copy of the project. It's always good to have a backup.)

  1. As stated in the official documentation, you need to update AGP to version 8.5.1 or higher to be able to compile with 16KB page size. The documentation says to upgrade NDK version to 28 but the versions 26 and 27 also compatible. You may leave it to any among 26, 27 or 28. The respective files to edit are: android/settings.gradle and look for the line like id "com.android.application" version "8.7.3" apply false and change to compatible version, and file android/app/build.gradle where you may change the like as ndkVersion "27.0.12077973".

  2. Your project code, if contains native code, must update to support 16KB page size.

  3. Your project dependencies listed in pubspec.yaml file, both direct and dev dependencies may need to be updated if they depend on native code. If you can identify the individual ones, you may update only those to the appropriate version, or else you should update all the dependency packages in your pubspec.yaml file. Also, the transient dependencies should be updated. How: To update the direct and dev dependencies, update the corresponding version number to each packages in the pubspec.yaml file and after that run flutter clean; flutter pub get from the project root which will update the direct and dev dependencies listed in pubspec.yaml file. Now to upgrade the transient dependencies: You can see the table with the command: flutter pub outdated and update the transient dependencies with flutter pub upgrade command (or flutter pub upgrade --major-versions).

  4. After you've updated the dependencies, try to run the project. Additional configuration changes may be asked and displayed as error messages. You should do as suggested. You may update your question if you need help with that.

After you fix these, check again for the 16KB alignment of .so packages and also test run in 16KB compliant emulator or devices.

Note: To update the dependencies in your pubspec.yaml VS Code extensions like Version Lens can ease the process. Similar should also exist for Android Studio.

Reasons:
  • Blacklisted phrase (1): Please check this
  • Blacklisted phrase (1): this link
  • Whitelisted phrase (-1): try the following
  • RegEx Blacklisted phrase (1): check this link
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: rusty