Search Unity

Question Oculus Build -> InvalidOperationException: The build target does not support build appending.

Discussion in 'VR' started by DStephensJr, Oct 26, 2020.

Thread Status:
Not open for further replies.
  1. DStephensJr

    DStephensJr

    Joined:
    Jun 8, 2017
    Posts:
    8
    I've searched all over. Can't even find a reference to this. Anyone have a clue what it means?

    I think I recently changed something, but I can't find what.

    This comes from the Oculus Ctrl+K command. Also on the Oculus Menu -> OVRBuild -> OVRBuild APK and Run.


    Any help would be great!

    thanks!

    From the Log file:

    (Filename: Assets/Oculus/VR/Editor/OVRBuild.cs Line: 241)

    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()
     
    CloudyVR likes this.
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    It's probably something in the Build Settings. Maybe Script-Only Build?
     
  3. DStephensJr

    DStephensJr

    Joined:
    Jun 8, 2017
    Posts:
    8
    Thanks for the reply @JoeStout.
    Unfortunately, that option is grayed out (and not set).
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    The fact that it's greyed out is very odd. You're sure you are set to the Android target?
     
  5. DStephensJr

    DStephensJr

    Joined:
    Jun 8, 2017
    Posts:
    8
    I'm sure, but always potentially wrong.
    upload_2020-10-29_7-34-35.png
    It does lead me to wonder if another setting or package is missing.
    upload_2020-10-29_7-36-23.png
    I can use the Ctrl+B to build and it installs, but doesn't run.
    upload_2020-10-29_7-39-43.png
    Do you see anything that jumps out obviously?
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    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?
     
  7. DStephensJr

    DStephensJr

    Joined:
    Jun 8, 2017
    Posts:
    8
    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.

    :-D
     
  8. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    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.
     
  9. subhashDev11

    subhashDev11

    Joined:
    Oct 30, 2020
    Posts:
    1
    same issue when try to build unity-library for flutter

    InvalidOperationException: The build target does not support build appending.
    UnityEditor.BuildPipeline.BuildPlayer (System.String[] scenes, System.String locationPathName, System.String assetBundleManifestPath, UnityEditor.BuildTargetGroup buildTargetGroup, UnityEditor.BuildTarget target, UnityEditor.BuildOptions options) (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
    UnityEditor.BuildPipeline.BuildPlayer (UnityEditor.BuildPlayerOptions buildPlayerOptions) (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
    UnityEditor.BuildPipeline.BuildPlayer (System.String[] levels, System.String locationPathName, UnityEditor.BuildTarget target, UnityEditor.BuildOptions options) (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
    Build.DoBuildAndroid (System.String buildPath, System.Boolean isPlugin) (at Assets/FlutterUnityIntegration/Editor/Build.cs:55)
    Build.DoBuildAndroidLibrary () (at Assets/FlutterUnityIntegration/Editor/Build.cs:23)

    for this issue any solution?
     
  10. Winston-Smith

    Winston-Smith

    Joined:
    Sep 2, 2013
    Posts:
    4
    I've got the same issue here. :(
     

    Attached Files:

    EP-Toushirou likes this.
  11. SampsaPlaysome

    SampsaPlaysome

    Joined:
    Oct 20, 2019
    Posts:
    34
    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;

    Spent a good portion of my day figuring this out.
     
    Doraemon231 likes this.
  12. midoshawky100

    midoshawky100

    Joined:
    Nov 10, 2020
    Posts:
    3

    sorry but I'm new is that means to edit build.cs file?
     
  13. SampsaPlaysome

    SampsaPlaysome

    Joined:
    Oct 20, 2019
    Posts:
    34
    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.
     
    midoshawky100 likes this.
  14. midoshawky100

    midoshawky100

    Joined:
    Nov 10, 2020
    Posts:
    3
    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!
     
  15. vintag

    vintag

    Joined:
    Sep 23, 2017
    Posts:
    1
    Same problem whit the build,

    EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle;
    var options = BuildOptions.AcceptExternalModificationsToPlayer;
    var report = BuildPipeline.BuildPlayer(
    GetEnabledScenes(),
    apkPath,
    BuildTarget.Android,
    options
    );

    how should I cheng it?
     
  16. midoshawky100

    midoshawky100

    Joined:
    Nov 10, 2020
    Posts:
    3
    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
     
    ConicalM likes this.
  17. ArthurRibeiro

    ArthurRibeiro

    Joined:
    Jul 10, 2018
    Posts:
    3
    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.
     
  18. SupremeMatador

    SupremeMatador

    Joined:
    Jun 29, 2019
    Posts:
    1
    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.

    private static UnityEditor.Build.Reporting.BuildReport UnityBuildPlayer()
    {
    var sceneList = GetScenesToBuild();
    var buildPlayerOptions = new BuildPlayerOptions
    {
    scenes = sceneList.ToArray(),
    locationPathName = gradleTempExport,
    target = BuildTarget.Android,
    options = BuildOptions.AcceptExternalModificationsToPlayer |
    BuildOptions.Development |
    BuildOptions.AllowDebugging
    };

    var buildResult = BuildPipeline.BuildPlayer(buildPlayerOptions);

    UnityEngine.Debug.Log(UnityBuildPlayerSummary(buildResult));

    return buildResult;
    }

    Thanks!
     
  19. nicholasmu

    nicholasmu

    Unity Technologies

    Joined:
    Feb 27, 2017
    Posts:
    9
    Maybe you need try these codes brefore BuildPlayer():
    Directory.CreateDirectory(gradleTempExport);
    EditorUserBuildSettings.exportAsGoogleAndroidProject = true;

     
Thread Status:
Not open for further replies.