Skip to content

[BUG] OVRPlugin.aar and InteractionSdk.aar ship identical Android namespace, breaking Gradle builds in Unity 6000.4.4f1+ #17

@manugildev

Description

@manugildev

Unity version

6000.4.4f1

Where does the issue occur?

  • In Unity Editor
  • In Quest builds

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

  1. Create a Unity project using Unity 6000.4.4f1 or later.
  2. Import the Meta XR SDK (Oculus Integration).
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions