Forum Discussion
piotrek
10 years agoExplorer
Does Unity generate correct AndroidManifest.xml?
I am using Unity 5.3.2f1 on OSX 10.10.5. I've got "Virtual Reality Supported" option checked and I am able to run app on the device. However, after using check_submission script and generating release APK I am getting those errors:
After looking at manifest from StagingArea folder I see it doesn't include those options.
Oculus docs say:
Does it mean that my Unity version is buggy and it doesn't generate correct manifest?
Does it mean I have to create own manifest file and put it into Plugins/Android? How should it look like? Should I copy it from StagingArea and replace required options?
Also first error seems to refer to Mobile SDK - should I worry about it?
***
*** 4 errors detected. Submission does not meet requirements.
***
--> APK ('/Users/piotr/Projects/VRUnityApp/apk_export_release.apk') is not built with SDK version v1.0.0 (or newer)
--> APK is launchable (launchable-activity)
--> Intent Filter Category attribute (application/activity/intent-filter/category) must be INFO in manifest
--> Exclude from Recents (android:excludeFromRecents) must be non-0 in manifest
After looking at manifest from StagingArea folder I see it doesn't include those options.
Oculus docs say:
The manifests of projects built with Unity's first-party VR support enabled (available in Unity 5.1.1p1 and later) are automatically updated during build to meet our requirements (landscape orientation, vr_only, et cetera).
Does it mean that my Unity version is buggy and it doesn't generate correct manifest?
Does it mean I have to create own manifest file and put it into Plugins/Android? How should it look like? Should I copy it from StagingArea and replace required options?
Also first error seems to refer to Mobile SDK - should I worry about it?
15 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffYes, it looks like we need to make a couple of changes to Unity's output in order to produce a manifest that the store can ingest:
APK is launchable:
This is what needs to change:
<category android:name="android.intent.category.LAUNCHER" />
To:
<category android:name="android.intent.category.INFO" />
Exclude from Recents (android:excludeFromRecents) must be non-0 in manifest:
android:excludeFromRecents="true" needs to be added to the activity block.
I'm not sure why it's reporting a stale mobile SDK. 5.3.2f1 uses mobile SDK 1.0. Please let me know if that persists after the above changes. We'll work with Unity to make the above easier for shipping builds. - vrdavebOculus StaffTo be clear: the AndroidManifest.xml that Unity generates is for development. I believe the ingestion tool on PC fixes the issues you mentioned. Maybe this hasn't been implemented yet for OSX. I'll ask around. In the meantime, you might want to retry the build/submit process on Windows.
- piotrekExplorer@vrdaved - check_submission tool on Windows doesn't give that Mobile SDK error for the same APK.
In order to create release version of the app, I had to create debug build and copy AndroidManifest file from StagingArea folder to Plugins/Android. Then I have to manually make changes mentioned by you.
I think docs should clearly say those things as devs might get lost how to get things working. - vrdavebOculus StaffThanks for following up. We are looking into the issue and should have a fix (and better documentation) before too long.
- vrdavebOculus StaffSounds like this may be due to the version of nm in use. Does the issue go away if you provide "--nm android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/arm-linux-androideabi/bin/nm" in the submission tool's command line?
- erica_laytonExpert ProtegeI'm having the same issues. My project is on Windows.
For --nm adjustment: by "submission tool" do you mean the submission validator tool? (my validator tool does not know what to do with the command you suggested)
...
Edit: Oops. Sorry to bug you guys:turns out I had my manifest file in the wrong place, all along :roll:
I moved my edited manifest to: /Assets/Plugins/Android in my project, and on the next build, it fixed the errors.
:D - vrdavebOculus StaffAre you sure it's the same issue? I don't see how it could happen on Windows. It would be great to see the logs from the failure.
- erica_laytonExpert ProtegePerhaps it's a different issue--more to do with Unity either overwriting or not recognizing the (correctly customized per your recommendations!) AndroidManifest.xml file I added. :shock:
Well, now I'm trying to build my signed APK for submission, and it gives me this error in the console:
Error building Player: XmlException: 'manifest' is expected
and then it lists the file path of the manifest file I added in my project under Assets/Plugins/Android/AndroidManifest.xml
It seems to be asking that I rename 'AndroidManifest.xml' to be 'manifest.xml' but when I rename it as such, Unity overwrites it with the default manifest. What is up with this error?
Your Validator tool is super helpful, btw! Before switching out my osig file for my own key, I got my build down to 1 error: 'Certificate is a debug cert'! So, this error with my custom manifest file is new...
As a last resort, I've been thinking about replacing the default Unity manifest file with my altered one and then switching it back, once I've built this thing. Is that a bad idea?
Let me know if you guys need more info on this situation--I'm pretty stumped on this end. :?
Thanks again!
p.s. Maybe it's an issue with plugins I'm no longer using that are still in the Plugins directory, overwriting the manifest? ...will fiddle with this and report back.
<EDIT> The problem does not seem to be the plugins. I'm heading over to the Unity forums to ask about this, because it's more of a Unity issue! - vrdavebOculus StaffDid you manage to resolve this? If not, a PM with your logs and (minimal) project would be very helpful.
- PenthiusXHonored Guest
This should help, im still in the process of solving the 'Certificate is a debug cert' issue
https://developer.oculus.com/documentation/publish/latest/concepts/publish-mobile-app-signing/Android Application Signing and Unity
Unity automatically signs Android applications with a temporary debug certificate by default. Before building your final release build, create a new Android keystore and assign it with the Use Existing Keystore option, found in Edit > Project Settings > Player > Publishing Options. For more information, see the “Android” section of Unity's documentation here:http://docs.unity3d.com/Manual/class-PlayerSettings.html.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device