Skip to content

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

Open

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.

#17 (comment)

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

Activity

  1. vrdaveb commented on May 14, 2026

    @vrdaveb

    Thanks for the flag! We've fixed this locally and will ship it in the next release.

  2. Squashi11 commented on Jun 10, 2026

    @Squashi11

    Well well

  3. Squashi11 commented on Jun 10, 2026

    @Squashi11
    Image I don't think you did
  4. vrdaveb commented on Jun 10, 2026

    @vrdaveb

    Sorry, this is still queueing for release.

  5. Claytonious commented on Jul 30, 2026

    @Claytonious

    What is the status on this? We have been holding off on Unity upgrades because of this and it's getting nearly untenable (because we need some other Unity upgrades that we can't wait much longer on). Is there any version of the Oculus SDK that works correctly with the latest Unity 6000.4.12 or 6000.5.x?

    How and why did this come about? It's an SDK for Unity ... in the first place!

  6. Squashi11 commented on Jul 31, 2026

    @Squashi11

    What is the status on this? We have been holding off on Unity upgrades because of this and it's getting nearly untenable (because we need some other Unity upgrades that we can't wait much longer on). Is there any version of the Oculus SDK that works correctly with the latest Unity 6000.4.12 or 6000.5.x?

    How and why did this come about? It's an SDK for Unity ... in the first place!

    We currently use 6.5 with latest SDK, and after you fix some errors all by yourself it works just fine. We are still using the fix made my unity on the official forum

  7. manugildev commented on Jul 31, 2026

    @manugildev
    Author

    A workaround could be to use a Custom Gradle Properties template (Player Settings → Android → Publishing Settings). In the new gradleTemplate.properties file created in Assets/Plugins/Android add:

    android.uniquePackageNames=false
    
  8. Claytonious commented on Jul 31, 2026

    @Claytonious

    after you fix some errors all by yourself it works just fine. We are still using the fix made my unity on the official forum

    So you are embedding the package(s), then fixing things like GetInstanceID being deprected, etc.? But relying on the Unity patcher to fix the gradle namespace problems?

  9. Squashi11 commented on Jul 31, 2026

    @Squashi11

    There are only 2 package errors that meta seems to have mistyped but can be fixed right away :

    Image And then we have this script in project that makes exporting possible: https://discussions.unity.com/t/bug-android-unable-to-export-due-to-oculus-integration-6000-4-4f1/1717674/22
  10. vrdaveb commented on Aug 3, 2026

    @vrdaveb

    Sorry, sample updates are lagging behind the SDK. We shipped the SDK fix months ago to UPM, but it never flowed into First Hand, which pinned the last version it was tested against. I'm asking the team to update the sample to latest in Github, but you may be able to simply update it yourself (or at least import the latest plugins) to get around the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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