Unity version
6000.4.4f1
Where does the issue occur?
Description
Both OVRPlugin.aar and InteractionSdk.aar declare com.oculus.Integration as their Android package namespace in their bundled AndroidManifest.xml files. Starting with Unity 6000.4.4f1, Gradle enforces unique namespaces across all AARs in a project, which causes Android export to fail with a duplicate namespace error.
Steps to reproduce
- Create a Unity project using Unity
6000.4.4f1 or later.
- Import the Meta XR SDK (Oculus Integration).
- Switch to Android platform and attempt to build or export.
Logs
Error:
Namespace 'com.oculus.Integration' is used in multiple modules and/or libraries: :InteractionSdk:, :OVRPlugin:. 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
Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main\AndroidManifest.xml Error:
Validation failed, exiting
FAILURE: Build failed with an exception.
Additional info
Gradle fails with a duplicate namespace conflict referencing com.oculus.Integration in both OVRPlugin.aar and InteractionSdk.aar.
Affected Versions
- Unity
6000.4.4f1 and later. This is caused by the Gradle 9+ update that Unity did, which is also coming to Unity 6.3 and Unity 6.0 in the coming months.
- Meta XR SDK (all recent versions bundling the affected AARs)
Root Cause
OVRPlugin.aar and InteractionSdk.aar both declare the same package="com.oculus.Integration" attribute in their AndroidManifest.xml. Gradle requires each AAR to have a unique namespace; having two AARs share one causes the Android build to abort.
Temporary Workaround
A community-written editor script (IPreprocessBuildWithReport) extracts each AAR before the build, rewrites the conflicting package attribute to unique values (com.oculus.Integration.core and com.oculus.Integration.interaction), and repacks the AARs. This is a fragile, temporary workaround that breaks on SDK updates. You can read more about the workaround here.
Request
Please assign unique package namespaces to OVRPlugin.aar and InteractionSdk.aar in a future Meta XR SDK release. This is a first-party packaging issue that cannot be properly fixed from the Unity side.
References
Unity version
6000.4.4f1
Where does the issue occur?
Description
Both
OVRPlugin.aarandInteractionSdk.aardeclarecom.oculus.Integrationas their Android package namespace in their bundledAndroidManifest.xmlfiles. Starting with Unity 6000.4.4f1, Gradle enforces unique namespaces across all AARs in a project, which causes Android export to fail with a duplicate namespace error.Steps to reproduce
6000.4.4f1or later.Logs
Additional info
Gradle fails with a duplicate namespace conflict referencing
com.oculus.Integrationin bothOVRPlugin.aarandInteractionSdk.aar.Affected Versions
6000.4.4f1and later. This is caused by the Gradle 9+ update that Unity did, which is also coming to Unity 6.3 and Unity 6.0 in the coming months.Root Cause
OVRPlugin.aarandInteractionSdk.aarboth declare the samepackage="com.oculus.Integration"attribute in theirAndroidManifest.xml. Gradle requires each AAR to have a unique namespace; having two AARs share one causes the Android build to abort.Temporary Workaround
A community-written editor script (
IPreprocessBuildWithReport) extracts each AAR before the build, rewrites the conflicting package attribute to unique values (com.oculus.Integration.coreandcom.oculus.Integration.interaction), and repacks the AARs. This is a fragile, temporary workaround that breaks on SDK updates. You can read more about the workaround here.Request
Please assign unique
packagenamespaces toOVRPlugin.aarandInteractionSdk.aarin a future Meta XR SDK release. This is a first-party packaging issue that cannot be properly fixed from the Unity side.References