Unity cannot remove com.unity.xr.oculus.android package
I've been trying to upgrade my project from the legacy Oculus Android implementation to the Oculus XR Plugin and the Loader.
Whenever I remove the com.unity.xr.oculus.android package, it keeps coming back.
In order to remove it, I need to uninstall the XR plugin, then the Package Manager registers that it knows I have the Android plugin. I then remove that one.
I restart.
When I come back, I have no Oculus implementation and my files are all failing to compile because of dependencies.
At this point, I add back the XR plugin and for some reason Unity adds the Android plugin as well.
Does anyone know how to fix this?
Assembly with name 'Unity.XR.Oculus.Editor' already exists (Packages/com.unity.xr.oculus.android/Editor/Unity.XR.Oculus.Editor.asmdef) Assembly with name 'Unity.XR.Oculus.Editor' already exists (Packages/com.unity.xr.oculus/Editor/Unity.XR.Oculus.Editor.asmdef)
Answer by vinrin · Jan 30, 2020 at 09:14 AM
The same error occurred installing the "XR Plugin Management" on Unity 2019.3.0f6, target platform Android (Oculus Quest).
I fixed by terminating every Unity process and deleting directories at
C:\Users\ {username}\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.xr.*
I couldn't build or play in editor due to this error, so please consider deleting few files from the cache.
Not quite, but searching for all appearances of that package on my computer and getting rid of it solved the problem
Thanks! I was pretty much hitting the same problem with Unity 2019.3.14f1 where my Oculus Quest builds were failing due to these packages repeatedly being reinstalled and clashing.
I closed down Unity and deleted all the com.unity.xr.* package caches as you suggested and I also deleted the com.unity.xr.oculus.android and com.unity.xr.oculus.standalone directories under my project's Library/PackageCache/ directory while Unity was shutdown.
The problem seems to have gone away now - phew!
Answer by dedady157 · Dec 30, 2019 at 12:34 PM
Same issues here. But ill add a load more info on the issue.
Error:
Assembly with name 'Unity.XR.Oculus.Editor' already exists (Packages/com.unity.xr.oculus.android/Editor/Unity.XR.Oculus.Editor.asmdef)
Assembly with name 'Unity.XR.Oculus.Editor' already exists (Packages/com.unity.xr.oculus/Editor/Unity.XR.Oculus.Editor.asmdef)
XR Plugin Managment: 'There are no installed plugin providers available for this platform' Dispite saying 'Oculus XR Plugin Installed'
Build:
Any, Known to be on both PC and Android Build Targets.
Unity: 2019.3.0f3 Personal using Preview Packages
com.unity.xr.legacyinputhelpers version 2.0.2
Library Caches:
com.unity.xr.oculus.android@2.38.6
com.unity.xr.oculus@1.1.4
Script Assemblies:
both com.unity.xr.oculus.android and com.unity.xr.oculus are not found.
Fixes: (Old, See Bottom)
None that I can see.
Removing the package caches manually does not prevent one from being re-generated.
Attempting to re-install has no difference in error.
Switching between Build Targets has no effect.
Steps to reproduce:
Create a project,
goto File>Build Settings, Click 'Player Settings...' goto 'XR Plugin Management' install the manager
try to install the Oculus SDK, this will attempt to install both packages at the same time, no way to disable either.
Notes:
com.unity.xr.oculus.android/Editor/OculusBuildProcessor.cs is incased with a '#if UNITY_ANDROID' however com.unity.xr.oculus/Editor/OculusBuildProcessor.cs contains no #if enclosure.
FIX: after switching to the PC Build Target then manually removing the com.unity.xr.oculus.android packet cache I was able to build and run the pc version, then switching back to the android version fixed itself and i was able ot build and run the android one too.
Answer by BaskaletGames · Dec 27, 2019 at 09:06 PM
same problem, did you fix it?
Nope. It's a huge PITA. Right now I'm just trying to revert to the old stuff, but the Oculus source is defining USING_XR_$$anonymous$$ANAGE$$anonymous$$ENT which prevents the OVR$$anonymous$$anager from updating because I don't actually have any subsystems. It's SO ANNOYING
Answer by AtomsInTheVoid · Feb 26, 2020 at 11:28 PM
Can someone PLEASE FIX THIS?! What the F is up with that, everytime I delete the android folder (because I do NOT need it) it auto-reinstalls upon recompile. STOP IT!!!
Have you already tried @nemesis92's workaround and it didn't work for you? I.e. close down Unity and delete all the com.unity.xr. package caches under C:\Users\ {username}\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.xr. and also delete the com.unity.xr.oculus.android* and com.unity.xr.oculus.standalone* directories under your project's Library/PackageCache/ directory while Unity is closed.
Answer by Gomzyakov · Mar 29, 2021 at 03:40 AM
same problem, no removal methods helped, Can someone PLEASE FIX THIS?!