Building apk with using Google VR(Cardboard) failure,Issue building android APK while using google VR (Google Cardboard)
I am using unity 2019.3 and I downloaded and imported the Google VR into my assests so I can make a VR game and export it to android. I made a simple scene and just wanted to test it out to see if it worked. Three days later I am still trying to debugg and figure out whats wrong and why it wont build. I have tried everything I saw in forums and videos. Downloaded SDK's and JDKS, made sure the settings were all correct. Made sure VR was enabled, made sure the platform was Android, and made sure everything was up to date. I tried googling my issue but couldnt find anyone who talked about it
Note: I did find something similar which was OVRPluggin.aar instead of my unitygvr.aar but that didnt work either
Here is the error from the console:
UnauthorizedAccessException: Access to the path "C:\Users\micha\Documents\Unity Projects\Space Vr\Temp\StagingArea\aar\unitygvr.aar" or "Temp\gradleOut\unityLibrary\libs\unitygvr.aar" is denied. System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at :0),Hello there. I have tried just about anything, all I want is to build a simple scene in unity (using the latest 2019 edition) and then build the apk and check it on my phone. I have spent 3 days so far trying to get this to work. I have downloaded the SDK's and JDK needed for it to work. I have it updated to the most recent patches as well. I am more than confident it isnt a SDK issue. I have tried different scene, uninstalling and reinstalling, looking online, but no one seemed to answer the issue with this error
Answer by SachinG · Jul 02, 2019 at 08:23 AM
Same problem I'm facing, exactly same. looking for a solution.
Answer by SachinG · Jul 02, 2019 at 12:55 PM
OK, @MikeStone ... I quickly installed the latest LTS version of Unity (2017.4) with the latest GVR SDK 1.200 and I converted the project to run on this version of unity ( though lot of scripts for UI like Canvas all went missing). I was able to build the project successfully and create the apk.
So as of now , it looks like the 2019.3 version of Unity has a problem building GVR for Android.
If you really want to continue your work, I suggest you to shift to 2017.4 until a stable release is done for 2019.3 (currently it is alpha)
Your answer
Follow this Question
Related Questions
Android sdk re-pack problem 2 Answers
Android Cardboard SDK published to WebGL - now using 5.4.1f1 0 Answers
No GearVR in My app, But it always start GearVR when I start my app! 0 Answers
Unable to target build platforms when building on Andriod (2018.2.0f2) 3 Answers
Is anyone else having problems with gvr responding to phone movement android? 1 Answer