← Back to All Updates
Published: November 1, 2026 • Unity Android Compliance

How to Fix Unity libil2cpp.so & libmain.so 16KB Page Size Error in Google Play

Unity mobile game developers uploading .aab files to Google Play Console frequently hit the "App does not support 16 KB memory page sizes" warning triggered by libil2cpp.so, libunity.so, or libmain.so. Here is the exact Unity Editor version matrix and NDK patch workflow to make your game compliant.

🎮 Scan Your Unity .aab File Instantly

Not sure if a third-party Unity plugin (AdMob, Firebase, IronSource, or FMOD) is still compiled at 4 KB? Test your bundle right in your browser:

Open Unity 16KB Page Size Checker →

1. Which Unity Versions Support 16 KB Page Sizes?

Unity precompiles libunity.so and libmain.so inside the Editor installation, while libil2cpp.so is compiled on your machine during the Android IL2CPP build step. You must use a patched Unity Editor release:

2. Force 16 KB Linker Flags for Custom IL2CPP Builds

If you export a custom Gradle project or pass custom IL2CPP linker flags in C# editor scripts, ensure the linker aligns PT_LOAD segments on 0x4000 (16384-byte) boundaries:

// Assets/Editor/Android16kbLinkerFix.cs
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;

public class Android16kbLinkerFix : IPreprocessBuildWithReport
{
    public int callbackOrder => 0;

    public void OnPreprocessBuild(BuildReport report)
    {
        if (report.summary.platform == BuildTarget.Android)
        {
            PlayerSettings.SetAdditionalIl2CppArgs("--linker-flags=\"-Wl,-z,max-page-size=16384\"");
        }
    }
}

3. Check Third-Party Native Plugins in Assets/Plugins/Android

Even after upgrading Unity, precompiled .so or .aar files inside Assets/Plugins/Android (such as Google Mobile Ads, Unity LevelPlay, or custom audio engines) can still fail Google Play checks.

  1. Build your release .aab file in Unity.
  2. Drop the .aab into the AABReady Unity 16KB Scanner.
  3. Review every arm64-v8a/*.so entry—any library showing 4 KB (0x1000) must be updated via the External Dependency Manager for Unity (EDM4U).