Build error for gear vr app involving manifest
I am making a prototype for a simple game and right now the project is as simple as possible, a textured cube imported from blender with an orb inside it also imported from blender. I also imported the character package from the assets menu and added an FPSController to my scene. I have managed to build and run this on android (though the controls didn't work...) but when I try to build it for the gear vr following this guide: http://www.androidauthority.com/create-first-gear-vr-app-690512/ I get a build error
Here are screenshots of my build and player settings:
And here is the output from the editor.log file:
/Users/colinmctaggart/Dropbox/WORK/Unity/Gallery/Temp/StagingArea/AndroidManifest-main.xml:4:125-150 Error:
Attribute application@debuggable value=(true) from AndroidManifest-main.xml:4:125-150
is also present at AndroidManifest.xml:3:148-174 value=(false).
Suggestion: add 'tools:replace="android:debuggable"' to <application> element at AndroidManifest-main.xml:4:3-12:17 to override.
/Users/colinmctaggart/Dropbox/WORK/Unity/Gallery/Temp/StagingArea/AndroidManifest-main.xml:4:16-57 Error:
Attribute application@theme value=(@style/UnityThemeSelector) from AndroidManifest-main.xml:4:16-57
is also present at AndroidManifest.xml:3:83-147 value=(@android:style/Theme.Black.NoTitleBar.Fullscreen).
Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest-main.xml:4:3-12:17 to override.
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
UnityEditor.Android.AndroidSDKTools:DetectErrorsAndWarnings(String, String)
UnityEditor.Android.AndroidSDKTools:RunCommandInternal(String, String, String[], Int32, String, WaitingForProcessToExit, String)
UnityEditor.Android.AndroidSDKTools:RunCommandSafe(String, String, String[], Int32, String, WaitingForProcessToExit, String)
UnityEditor.Android.AndroidSDKTools:RunCommand(String[], Int32, String, WaitingForProcessToExit, String)
UnityEditor.Android.AndroidSDKTools:RunCommand(String[], String, WaitingForProcessToExit, String)
UnityEditor.Android.AndroidSDKTools:RunCommand(String[], WaitingForProcessToExit, String)
UnityEditor.Android.AndroidSDKTools:MergeManifests(String, String, String[], WaitingForProcessToExit)
UnityEditor.Android.PostProcessor.Tasks.GenerateManifest:MergeManifests(PostProcessorContext, String, String)
UnityEditor.Android.PostProcessor.Tasks.GenerateManifest:Execute(PostProcessorContext)
UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks(PostProcessorContext)
UnityEditor.Android.PostProcessAndroidPlayer:PostProcess(BuildTarget, String, String, String, String, String, String, BuildOptions, RuntimeClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor:PostProcess(BuildPostProcessArgs)
UnityEditor.PostprocessBuildPlayer:Postprocess(BuildTargetGroup, BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry, BuildReport) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:485)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:339)
UnityEditor.BuildPlayerWindow:GUIBuildButtons(IBuildWindowExtension, Boolean, Boolean, Boolean, BuildPlatform) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:1390)
UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:1317)
UnityEditor.BuildPlayerWindow:OnGUI() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:913)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView:Invoke(String, Object) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:262)
UnityEditor.HostView:Invoke(String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:255)
UnityEditor.HostView:OnGUI() (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:84)
(Filename: /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs Line: 186)
AndroidSDKToolsException: Unable to merge android manifests. See the Console for more details.
at UnityEditor.Android.AndroidSDKTools.DetectErrorsAndWarnings (System.String logMessages, System.String errorMsg) [0x00000] in <filename unknown>:0
at UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0
at UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0
at UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0
at UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0
at UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0
at UnityEditor.Android.AndroidSDKTools.MergeManifests (System.String target, System.String mainManifest, System.String[] libraryManifests, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit) [0x00000] in <filename unknown>:0
at UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.MergeManifests (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String targetManifest, System.String mainManifest) [0x00000] in <filename unknown>:0
at UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x00000] in <filename unknown>:0
at UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x00000] in <filename unknown>:0
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:485)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:339)
UnityEditor.BuildPlayerWindow:GUIBuildButtons(IBuildWindowExtension, Boolean, Boolean, Boolean, BuildPlatform) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:1390)
UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:1317)
UnityEditor.BuildPlayerWindow:OnGUI() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:913)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView:Invoke(String, Object) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:262)
UnityEditor.HostView:Invoke(String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:255)
UnityEditor.HostView:OnGUI() (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:84)
(Filename: Line: -1)
Unloading 14 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 252.4 MB.
System memory in use after: 252.5 MB.
Unloading 10 unused Assets to reduce memory usage. Loaded Objects now: 2848.
Total: 11.396306 ms (FindLiveObjects: 0.314574 ms CreateObjectMapping: 0.056932 ms MarkObjects: 10.281447 ms DeleteObjects: 0.742021 ms)
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Advertisements/UnityEngine.Advertisements.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/Standalone/UnityEngine.UI.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/Standalone/UnityEngine.Networking.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/TestRunner/standalone/nunit.framework.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityHoloLens/Runtime/UnityEngine.HoloLens.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityPurchasing/UnityEngine.Purchasing.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityVR/Runtime/UnityEngine.VR.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Advertisements/UnityEngine.Advertisements.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/Standalone/UnityEngine.UI.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/Standalone/UnityEngine.Networking.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/TestRunner/standalone/nunit.framework.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityHoloLens/Runtime/UnityEngine.HoloLens.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityPurchasing/UnityEngine.Purchasing.dll' because we're compiling for Editor:Editor
Ignoring '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/UnityVR/Runtime/UnityEngine.VR.dll' because we're compiling for Editor:Editor
- starting compile Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll, for buildtarget 13
Load scene 'Temp/__Backupscenes/0.backup' time: 0.777798 ms
Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 255.5 MB.
System memory in use after: 255.7 MB.
Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 2859.
Total: 13.617915 ms (FindLiveObjects: 0.417748 ms CreateObjectMapping: 0.026472 ms MarkObjects: 13.163993 ms DeleteObjects: 0.007972 ms)
*** Completed 'Build.Player.AndroidPlayer' in 20 seconds (20053 ms)
[00:00:00] Enlighten: Precompute started.
[00:00:00] Enlighten: Finished 1 Layout Systems job (0.00s execute, 0.00s integrate, 0.14s wallclock)
[PathTracer][LP] Issuing deduplication and tetrahedralization job. Combined: 80257199cfa681a16be5e09b3c2208f4, tetrahedralized probes: 00000000000000000000000000000000, non-tetrahedralized probes: 00000000000000000000000000000000, dependencies: 00000000000000000000000000000000
[00:00:00] Enlighten: Finished 1 Tetrahedralize Probes job (0.00s execute, 0.00s integrate, 0.05s wallclock)
[00:00:00] Enlighten: Precompute took 0.188991 seconds.
Enlighten scene contents: 0 geometries. 0 instances. 0 systems. 0 probe groups. 0 cube maps. Scene is up-to-date.
[00:00:00] Enlighten: Bake started.
[PathTracer][LP] Integrating deduplicated and tetrahedralized probes for hash 80257199cfa681a16be5e09b3c2208f4.
Launching external process: /Applications/Unity/Unity.app/Contents/Tools64/JobProcess
[00:00:00] Enlighten: Finished 1 Bake Runtime job (0.04s execute, 0.00s integrate, 0.06s wallclock)
[00:00:00] Enlighten: Bake took 0.064713 seconds.
[PathTracer] Lightmap reset.
[PathTracer][LP] Light probes reset.
[PathTracer] building lightmap data asset.
[00:00:01] Enlighten: Finished 1 Ambient Probes job (0.00s execute, 0.00s integrate, 0.05s wallclock)
[00:00:01] Enlighten: Finished 1 Reflection Probes job (0.00s execute, 0.00s integrate, 0.07s wallclock)
I understand that there are conflicting properties in android manifest files and unity doesn't know how to automatically resolve them but I don't know where these files are, the log doesn't give filenames or paths and I can't find any manifest files in the project.
Does anyone know how I can get this to build properly?
Same problem here. Wow, the question is 1 hour old and already the first result of google, hehe
Answer by youngwolf0 · May 20, 2017 at 06:00 PM
I found the answer, It looks like the mac version of unity doesn't play well with gear vr. It causes errors when it generates the manifest file. To solve it I had to copy the generated manifest from the staging area directory and remove the reference to android theme and debug mode. It seems to work fine now.
Answer by chrisvarnsverryvirtualarts · May 24, 2017 at 05:19 PM
We encountered the issue with the unity player manifest colliding with the oculus integration manifest on the android:theme attribute. We solved it by modifying the unity player manifest (Assets/Plugins/Android/AndroidManifest.xml), adding tools:replace="android:theme" to the application element, and xmlns:tools="http://schemas.android.com/tools" to the manifest element itself.
Hope this helps someone else.
Answer by taxvi · May 20, 2017 at 11:21 AM
In my case it seems like it's caused by multiple VR devices in the Player Settings:
after I removed Oculus from the VR settings the bug was gone. This bug destroys the purpose of having the VR SDKs options in the Player Settings :D I still have to manually add/remove VR SDKs before building for each platform
C'est La Vie
¯_(ツ)_/¯
Answer by sethwklein · Jul 24, 2017 at 04:19 PM
This issue and solution in the issue tracker: https://issuetracker.unity3d.com/issues/the-project-does-not-build-on-android-platform-using-the-updated-android-sdk-tools-26-dot-0-during-the-merging-manifest-files#c_25522