[请采取行动] 您的应用需遵循 Google Play 针对 16 KB 页面大小施行的要求

为确保您的应用能在最新版 Android 上正常运行,Google Play 要求以 Android 15 及更高版本为目标平台的应用支持 16 KB 内存页面大小。

自 2025年11月1日起,如果您的应用更新不支持 16 KB 内存页面大小,您将无法发布相应更新。

google play console 16KB requirement

无需更改的应用

一些应用完全依赖Android的标准框架和内存管理,操作系统会自动处理内存的分配和使用,因此它们无需特别调整来适配不同的页面大小。

  • 100% Kotlin/Java代码
  • 不包含原生库(.so文件)
  • 使用标准Android SDK

需要检查的应用

1、使用 NDK 的应用

一些应用使用 NDK,即用 C/C++ 编写底层代码,直接操作设备硬件。这类应用在处理内存时,可能会遇到与 Page Size 不兼容的情况。例如,开发者可能硬编码了固定的内存页大小,而没有考虑到设备的不同页面大小,这就可能导致内存分配问题或效率下降。

2、包含第三方原生库的应用

  • 游戏引擎(Unity、Unreal Engine)
  • 跨平台框架(React Native、Flutter)
  • 多媒体库(FFmpeg、OpenCV)
  • 网络库(OkHttp native部分)

3、使用特定SDK的应用

Unity版本16 KB 页面大小支持情况

页面是操作系统管理内存的精细程度。为了全面提升操作系统性能,并为设备制造商提供这种权衡取舍的选项,Android 15(API 级别 35)及更高版本可以采用 4 KB 或 16 KB 页面大小运行。配置为 16 KB 页面大小的设备平均会使用略多的内存,但也会获得各种性能提升。

Unity 为 Unity 2021、2022 和 Unity 6 提供 16 KB 页面支持。

16 KB memory page size support

Unity supports devices with 16 KB memory page sizes, a feature introduced in Android 15. For more information about the feature, refer to the Android documentation on Support 16 KB page sizes.

Unity applications built for devices with 4 KB memory page size might not work on devices with 16 KB memory page size. To ensure your application is compatible with the devices that use 16 KB memory page size, consider the following key points:

  • Update Unity to 6000.0.38f1 or later version. Update the native plug-ins
    , rebuild, and resubmit your application to Google Play. The same application executable will be able to support devices with both 4 KB and 16 KB memory page sizes. For more information, refer to Android documentation on Build your app with support for 16 KB devices.
  • If your project contains a plug-in with a .so file that’s aligned to 4 KB instead of 16 KB, the Unity Editor displays a warning during the build process.
  • If your application uses third-party plug-ins or SDKs that link to native libraries, contact the plug-in creators to confirm that their native libraries are compatible with 16 KB page sizes. Update the relevant SDKs and resubmit your application.
  • For guidelines on testing your application on devices with 16 KB memory page sizes, refer to the Android documentation on Enable 16 KB mode on a device using developer options.

[INFO] Unity Engine support for 16 KB memory page sizes (Android 15+)

Support for 16 KB sizes is available from the following Unity versions:

  • Unity 6000.1+ released February 9, 2025
  • Unity 6000.0.38f1+ released February 14, 2025
  • Unity 2022.3.56f1+ released January 15, 2025
  • Unity 2021.3.48f1+ released January 22, 2025 accessible under extended LTS support for Enterprise/Industry customers

Can my existing app (4 KB) run on a 16 KB page size device?

No. Our tests indicate that Unity apps compiled for 4 KB memory page size will not work on 16 KB devices.

I am using an older/unsupported version of Unity

The 16 KB feature will be available for supported versions of Unity (2021 Extended Support/2022 LTS/Unity 6). To benefit from this feature, please update to one of these versions.

Android Studio 项目适配修改

  1. 更新开发工具
  • 2. Gradle项目配置更新
  • 3. 移除硬编码页面大小
  • 4. 使用动态页面大小

NDK 最低支持版本 r28+

参考地址

留下评论

您的邮箱地址不会被公开。 必填项已用 * 标注