Unity 6.3+ features an update to its Android build tooling, moving to Gradle 9.1.0 (from 8.13) and to Android Gradle Plugin (AGP) 9.0.0 (from 8.10.0).
While we aim to keep build dependencies as stable as possible, staying current with Android’s ecosystem is vital for security, performance, and long-term compatibility with the Play Store. This update ensures that Unity’s Android builds remain modern and reliable.
What does this mean for you?
For the majority of projects, this change happens entirely under the hood. However, if you use custom Gradle templates (mainTemplate.gradle, launcherTemplate.gradle) or rely on older third-party plugins, you may need to make a few manual adjustments to avoid build errors.
Timeline
This update is currently scheduled to land in:
Unity Version
Release Date
6000.5.0a7+
Released: February 18, 2026
6000.4.4f1
Released: April 24, 2026
6000.3.17f1
Released: June 5, 2026
6000.0.79f1
Expected: July 10, 2026
Migration
Because AGP 9.0.0 removes several older attributes, your build might throw warnings or fail if your custom scripts still reference them. In most cases, Unity will automatically try to solve these issues for you when building your project.
Key changes to look out for:
Property Removals: Attributes like targetSdkVersion, minSdkVersion, lintOptions, and packagingOptions have been removed from the Gradle DSL. These should now be handled via their modern equivalents. This is automatically handled by the Gradle Template Updater.
ProGuard Updates: AGP 9.0.0 replaces proguard-android.txt for the optimized version: proguard-android-optimize.txt. Using the old proguard-android.txt is not allowed anymore.
API changes: If you have custom logic in .gradle templates, make sure you check out the deprecated API from the official AGP release notes.
Unique namespaces: Make sure any custom Android plugin or .androidlib in your project has a unique namespace or package name. You can set this in either:
AndroidManifest.xml using package="com.example.library.unique" or
The build.gradle file of that library using namespace "com.example.library.unique".
What you should do:
Check your templates: If you have “Custom Gradle Template” enabled in Player Settings, review your .gradle files for any of the removed attributes listed above. If you’re using any removed attributes, Unity will display a dialog on build and automatically rename them to use the newer version of these attributes.
Update Plugins: Check for updates from third-party SDK providers (Ads, Analytics, etc.) to ensure they support AGP 9.0.
Changing the namespace in the AndrodManifest.xml gives this error on build
Incorrect package="com.google.unity.ads.unique" found in source AndroidManifest.xml: C:\xxxx\unityLibrary\GoogleMobileAdsPlugin.androidlib\AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
Recommendation: remove package="com.google.unity.ads.unique" from the source AndroidManifest.xml:
It seems that updating it in the build.gradle is now the only viable option and should be the recommended approach moving forward.
…but the problem is that :unityandroidpermissions: nor :arcore_client: is my custom plugin. So how do I make sure that “all modules and libraries have a unique namespace”? How do I fix this error?
> Task :launcher:processDebugMainManifest FAILED
[:unityandroidpermissions:] /Users/.../.gradle/caches/9.1.0/transforms/cb80e2df6de30f2cd712379ad0fa0545/transformed/jetified-unityandroidpermissions/AndroidManifest.xml Error:
Namespace 'com.google.ar.core' is used in multiple modules and/or libraries: :unityandroidpermissions:, :arcore_client:. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace
/Users/.../Projects/.../...-droid264/launcher/src/main/AndroidManifest.xml Error:
Validation failed, exiting
I got this error when build using Unity 6000.3.18f1 with AGP upgrade from 8.7.2 to 9.0.0
Error:
Namespace ‘com.appsflyer’ is used in multiple modules and/or libraries: com.appsflyer:purchase-connector:2.2.0, com.appsflyer:af-android-sdk:6.18.0. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace
/Users/admin/Working/_blank/Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/src/main/AndroidManifest.xml Error:
Validation failed, exiting
Im using Appsflyer 6.18.1 and EDM4U 1.2.186 install via UPM from this
It able to build if i remove this line in AppsFlyerDependencies.xml <androidPackage spec="com.appsflyer:purchase-connector:2.2.0"></androidPackage>
but it make Appsflyer not working with Purchase Connector.
It also able to build if use unity 6000.3.18f1 with AGP 8.7.2
here is bug detail i posted in repo of jar resolver
As @IGuscin said, the issue seems to be in the Applfyer library. Please, report he issue in their repo AppsFlyerSDK/appsflyer-unity-plugin , or try updating that dependency to see if they have fixed it in newer versions.