Search Unity

[Solved] Can't Make Android Build - Access to OVRPlugin.aar Denied

Discussion in 'Android' started by TheoTowers, Nov 23, 2017.

  1. TheoTowers

    TheoTowers

    Joined:
    May 8, 2013
    Posts:
    7
    Just wanted to bring to everyone's attention this horrendous bug in Unity 2017.1.2p3 (and probably other versions as well). My build process was getting interrupted with the following error:

    UnauthorizedAccessException: Access to the path "C:\Program Files\Unity_2017_1_2p3\Editor\Data\UnityExtensions\Unity\VR\Android\OVRPlugin.aar" or "Temp\StagingArea\aar\OVRPlugin.aar" is denied.

    The solution was to rename the OVRPlugin.aar file to another extension like OVRPlugin.bak.

    I don't know why Unity would even be looking inside the Editor folder, since I have a plugin inside my project. I would assume it would use plugins inside the project first before ever looking in the Editor folder.
     
  2. BongFilter

    BongFilter

    Joined:
    May 2, 2016
    Posts:
    2
    Thank You Sir! You solved my problem as well.
     
  3. notdococ

    notdococ

    Joined:
    Oct 24, 2018
    Posts:
    1
  4. DHARMAKAYA

    DHARMAKAYA

    Joined:
    Dec 1, 2014
    Posts:
    56
    That "solution" is ridiculous. That OBVIOUSLY would make the ovrplugin not function...confirmed that a moment ago.

    Any other ACTUAL solution found?
     
  5. bigdaddio

    bigdaddio

    Joined:
    May 18, 2009
    Posts:
    214
    Go to the package manager and remove the Oculus (Android) package.
     
    alekz1k and pooom1102 like this.
  6. Echoshard1

    Echoshard1

    Joined:
    Nov 26, 2013
    Posts:
    2
    I have found functional work around for now

    Reinstall in the Package

    Go into the Oculus/VR/Plugins/1.3x/AndroidUniversal/OVRPlugin in your project and Check Android in the plugin and hit apply.


    I have attached a photo
     

    Attached Files:

  7. jerry2157

    jerry2157

    Joined:
    Mar 23, 2014
    Posts:
    17
    It worked in 2018.3.0f2 for GearVR
     
  8. ZaRooster

    ZaRooster

    Joined:
    Jan 29, 2019
    Posts:
    1
    Thank you! I have been pulling my hair out trying to get a build. This solved it.
    Works now on Oculus Go with Unity 2018.3.0f2
     
  9. waronin3D

    waronin3D

    Joined:
    Mar 1, 2013
    Posts:
    17

    Far better solution than renaming important files. :D
     
  10. digitalStudio

    digitalStudio

    Joined:
    Jan 30, 2015
    Posts:
    3
    Perfect!
     
  11. jiggstrom

    jiggstrom

    Joined:
    Mar 25, 2016
    Posts:
    1
    This solved it for me, thank you!!