Modifying AndroidManifest for GearVR
Hello,
I an trying to upload my game to the Oculus store but I am failing the validator, it say:
Exclude from Recents (android:excludeFromRecents in AndroidManifest.xml) must be set to true.
APK's main activity intent filter set to android.intent.category.LAUNCHER
, but must be android.intent.category.INFO
I know I need to change this in the AndroidManifest.xml, but I cannot find it. I've read it is suppose to be found in assets/plugins/adroid but it is nowhere to be found. I've searched for it.
Where do I go to modify this xml file? It seems it is compiled between the various settings in the editor.
Answer by kibbles-n-crits · Apr 21, 2016 at 10:38 PM
So what I learned was that Unity will compile the manifest file from your settings and pack it with your APK, you have to decompile that APK using something like APKTools (http://ibotpeaches.github.io/Apktool/documentation/) to get the final XML which you will then copy into /assets/plugins.android which then Unity will use that one instead of the compiled one. Then you can edit it to match what Occulus requires. I am about to try that now so wish me luck!
Answer by natwales · Apr 21, 2016 at 03:21 PM
I found my Manifest file(s) in Temp/StagingArea/. My understanding is that you could copy that and put it in your Assets/Plugins/Android folder with your edits and that will be used instead of the manifest generated by Unity.
I can confirm this as fix. In my case (5.4b20) nothing else worked.
Yes. Copy autogenerated manifest from Temp/StagingArea/ into Assets/Plugins/Android folser in unity project. I had to delete android:theme attribute from manifest to get rid of error
Answer by W_M_Reszke · Jan 31, 2017 at 06:51 PM
Just use the "Build" option, instead of "Build and Run" while building the app and this particular error won't occur.
I tried this and it didn't work. Why would that make any difference to the APK?
Answer by TheCircadian · Mar 09, 2021 at 10:43 PM
It's in Oculus' documentation. There are settings you need to change to get this working: https://developer.oculus.com/distribute/publish-mobile-manifest/
Your answer
Follow this Question
Related Questions
CommandInvokationFailure: Failed to re-package resources (ONE MORE TIME QQ) 1 Answer
Why is my projection messed up and green in my Android VR build but not in my game view? 1 Answer
Quest 2 Building Issue System.Windows.Forms.dll assembly && OnMouse_ event handlers 0 Answers
Unity detect wrong androidSDK version 0 Answers
Error to import Unity project with Vuforia to Android Studio 3.0 0 Answers