InvalidOperationException: The build target does not support build appending.
at UnityEditor.BuildPipeline.BuildPlayer (System.String[ ] scenes, System.String locationPathName, System.String assetBundleManifestPath, UnityEditor.BuildTargetGroup buildTargetGroup, UnityEditor.BuildTarget target, UnityEditor.BuildOptions options) [0x00066] in <1fe7a3c0284a456b9681b7a93141c89a>:0
at UnityEditor.BuildPipeline.BuildPlayer (UnityEditor.BuildPlayerOptions buildPlayerOptions) [0x0002b] in <1fe7a3c0284a456b9681b7a93141c89a>:0
at OculusBuildApp.UnityBuildPlayer () [0x00043] in D:\SoftwareDev\TFSOnline\Unity\Unity 19\SnipeHunterVR\Snipes_Quest\Assets\Oculus\VR\Editor\OVRBuild.cs:312
at OculusBuildApp.StartBuildAndRun () [0x000aa] in D:\SoftwareDev\TFSOnline\Unity\Unity 19\SnipeHunterVR\Snipes_Quest\Assets\Oculus\VR\Editor\OVRBuild.cs:246
UnityEditor.EditorApplication:ExecuteMenuItem(String)
UnityEditor.ShortcutManagement.MenuItemEntryDiscoveryInfo:<.ctor>b__7_0(ShortcutArguments)
UnityEditor.ShortcutManagement.Trigger:HandleKeyEvent(Event, IContextManager)
UnityEditor.ShortcutManagement.ShortcutController:HandleKeyEvent(Event)
UnityEditor.ShortcutManagement.ShortcutIntegration:EventHandler()
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
Nothing jumps out. But I’m surprised by “I can use the Ctrl+B to build and it installs, but doesn’t run.” I thought the problem was a build error.
If it’s actually building and installing, then what happens when you try to run it (by launching it in Oculus from the “unsupported apps” menu)? Do you understand how to watch the logs with adb?
Ctrl+B works. Oculus menu options for Ctrl+K doesn’t work. Roughly equivalent, but I’m not sure why Oculus added their build options. Maybe they intended to do build appending for a reason (performance? faster build time?)
Ctrl+K did work at one time. Ctrl+B seems to only build and Download, but not run.
I reassembled the project and must have lost something on the way.
I guess I will need to remove and re-add Oculus Integration.
Thanks for taking time to look at this. It’s just odd and really strange that I can’t find anything on it. That usually means I missed something really stupid. Everyone else got it right.
I dunno, I didn’t even know the Ctrl+K thing was a thing. But Ctrl+B should build, download, and run. I don’t know why it’s not doing that for you. Be sure you have developer mode turned on on your headset (though I don’t think you could download if that weren’t set). At the moment, I’m out of ideas.
Our build pipeline broke down too when upgrading to 2019.4.14f1. Unity has changed the behaviour of BuildOptions.AcceptExternalModificationsToPlayer. It no longer works with Gradle builds. You have to use EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
Sorry should have been more precise. I’m not using any Oculus stuff, but apparently Oculus is making the builds the same way: by adding AcceptExternalModificationsToPlayer build option to export Gradle builds. That needs to be changed as described above. Unfortunately I don’t know anything about Oculus build tools, but maybe somebody who does, can fix it.
But you’re right. Build.cs (or any place that calls BuildPipeline.BuildPlayer) needs to be changed.
thanks for replying I’m not using Oculus I’m just using flutter plugin I cant export the project to flutter because of this error :") I hope u tell me how exactly I should edit it!
hey thank you btw i just changed the line of
var options = BuildOptions.AllowDebugging.AcceptExternalModificationsToPlayer;
to something else like that
var options = BuildOptions.AllowDebugging;
and it worked
From oculus documentation: “(…) command that utilizes the gradle cache to speed up the build process.”,
if you just remove AcceptExternalModificationsToPlayer you won’t generate the gradle project and might as well just use the unity default build.
Hi, I’m having the same issue, I’m pretty new to unity, does anyone know what exactly needs to be modified/deleted?
I used to be able to build my app perfectly on previous unity versions.
Maybe you need try these codes brefore BuildPlayer():
Directory.CreateDirectory(gradleTempExport);
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;