Android 16 & Target 36 Compatibility Documentation
Android 16 Compatibility
According to Google Play, latest policies for app publishing, starting from August 31, 2025, targetSdkVersion must be API 35 (Android 16) or higher, and from August 2026, it must be API 36 (Android 16) or higher.API 36 (Android 16) is expected to become mandatory in Q3 2026, based on Google's annual enforcement pattern.
To meet long-term compliance requirements and avoid release blocks or app removal risks, Player Network SDK V1.32 has upgraded targetSdkVersion to 36. Integrators need to complete the necessary build environment adjustments.
Behavioral Change Impact
For Android 16, Google has introduced several mandatory behavior changes and permission restrictions. These changes only take effect when targetSdkVersion = 36 and mainly include:
| Category | Remarks |
|---|---|
| Edge-to-Edge compulsory adaptation | View.setSystemUiVisibility and SYSTEM_UI_FLAG_* series constants are completely invalid on Android 16. Use WindowInsetsControllerCompat to implement immersive and full screen. |
| Predictive Back gesture | The onBackPressed() override method is deprecated and must be replaced by handling the return logic with OnBackPressedDispatcher + OnBackPressedCallback. |
For the full list of changes, see Android 16 features and changes.
If integrators do not upgrade targetSdkVersion = 36, the above behaviors will not be triggered, and the SDK cannot guarantee correct feature correctness under a non-compatible behavior model.
Support for 16KB Page Size
Starting from Android 16, AOSP supports devices with memory page sizes configured to 16KB.If your app uses any NDK libraries, whether directly or indirectly through an SDK, you will need to rebuild your app to run on these 16KB devices.As device manufacturers continue to produce devices with larger physical memory (RAM), many of these devices will adopt 16KB (or even larger) memory page sizes to optimize performance.Adding support for devices with 16KB memory page size allows your app to run on these devices and benefit from the associated performance improvements.If the app is not recompiled, it may not run properly on devices with 16KB memory pages in future Android versions.
Note: Project adaptation for 16KB memory page size requires engine support. The support status and plans for mainstream engines are as follows:
- Unity: Not supported yet. Planned support in LTS versions. See https://discussions.unity.com/t/about-support-16-kb-page-sizes-on-android-16/950036 for details
- Unreal: Not supported
Currently, only Pixel 8, 8 Pro, and 8a devices running Android 16 QPR1 Beta can enable 16KB mode in Developer Options. The adoption of 16KB mode will take time. Businesses can follow engine support plans to determine or adjust the timing for project support.
Development Environment Compatibility Changes
- Unity
- Unreal Engine
It is recommended to upgrade Unity to the following LTS version or higher:
- 2021.3.45f1
- 2022.3.60f1
- 6000.0.45f1
Set the project to target Android API level 36 by upgrading the targetSdkVersion in Unreal Engine:
- In your Unreal Engine project, locate the Config folder and open the
DefaultEngine.inifile; - In the
DefaultEngine.inifile, add or modify the following lines to set thetargetSdkVersion:
TargetSDKVersion=36
SDKAPILevelOverride=android-36
- After making the changes, save and close the
DefaultEngine.inifile.
Upgrade Android Gradle Plugin (AGP)
- Unity
- Unreal Engine
Upgrade the Gradle Wrapper version
-
In the Editor menu, go to Unity > Settings > External Tools, uncheck the Gradle installed with Unity option, and then select the path to the device’s
gradle-8.11.1-binin the Gradle path field below. -
Modify the environment variables and set the
GRADLE_HOMEvariable to the path of Gradle version 8.11.1:# sh
export GRADLE_HOME=/Users/***/.gradle/wrapper/dists/gradle-8.11.1-bin/****/gradle-8.11.1
export PATH=${PATH}:${GRADLE_HOME}/bin
Modify the AGP version dependency
After upgrading to Player Network SDK V1.32, AGP has already been upgraded to version 8.9.1 in Assets/Plugins/Android/baseProjectTemplate.gradle, so no further modifications are needed.
Check the "com.android.tools.build:gradle:x.x.x" entry in the Assets/Plugins/Android/baseProjectTemplate.gradle file.
If the version is lower than 8.9.1, update it to 8.9.1.Otherwise, no modification is needed.
Follow the steps below to upgrade AGP:
Upgrade the Gradle Wrapper version
-
Download gradle-8.11.1-bin.zip and extract it;
-
Modify the environment variables and set the
GRADLE_HOMEvariable to the extracted path of gradle-8.11.1-bin:# sh
export GRADLE_HOME=/Users/***/.gradle/wrapper/dists/gradle-8.11.1-bin/****/gradle-8.11.1
export PATH=${PATH}:${GRADLE_HOME}/bin -
Modify the file
/Engine/Build/Android/Java/gradle/gradle/wrapper/gradle-wrapper.properties, and changedistributionUrlto the URL for Gradle 8.11.1:distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
Modify the AGP version dependency
After upgrading to Player Network SDK V1.32, AGP has already been upgraded to version 8.9.1 in INTLSDK/Source/INTLCore/Libs/Android/INTLCore_APL.xml, so no modification is needed.
Add or modify the following in the APL file:
<buildscriptGradleAdditions>
<insert>
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
}
</insert>
</buildscriptGradleAdditions>
Upgrade Java version
- Unity
- Unreal Engine
It is recommended to use the default Java version provided by Unity.
AGP 8.9.1 requires Java 17. If the current Java version is lower than 17, you need to download and install JDK 17 and update the environment variable accordingly:
# sh
# set JAVA_HOME to your jdk 17 installation path.
export JAVA_HOME=/Users/***/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home
export PATH=${PATH}:${JAVA_HOME}/bin
Validation
Basic information confirmation
Unpack the APK, and in the AndroidManifest.xml file inside the package, check the following fields to ensure they meet expectations:
-
Check the
packageattribute in<manifest>to confirm the package name is correct; -
Check the
platformBuildVersionCodeattribute in<manifest>; the expected value should be 36; -
Check the
android:minSdkVersionattribute in<uses-sdk>; the value should match the minimum Android API version supported by your project;Android API to Android version reference table: https://apilevels.com/
-
Check the
android:targetSdkVersionattribute in<uses-sdk>; the expected value should be 36;
Sample AndroidManifest.xml:
{/* -AndroidManifest */}
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
android:compileSdkVersion="36"
android:compileSdkVersionCodename="14"
package="your.package.name"
platformBuildVersionCode="36"
platformBuildVersionName="14">
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="36" />
......
Compatibility Testing
Use the build for compatibility testing, with a focus on its performance on Android 16.