Unable to create an Android build with UE 4.26.1 (The following files are set to be staged, but contain restricted folder names ("Desktop"))

ERROR: The following files are set to be staged, but contain restricted folder names ("Desktop"):
       PlatformerGame/Content/FMOD/Desktop/Ambient.bank
       PlatformerGame/Content/FMOD/Desktop/Illegal_Music.bank
       PlatformerGame/Content/FMOD/Desktop/Master.bank
       PlatformerGame/Content/FMOD/Desktop/Master.strings.bank
       PlatformerGame/Content/FMOD/Desktop/Music.bank
       PlatformerGame/Content/FMOD/Desktop/Voice_ENG.bank
       PlatformerGame/Content/FMOD/Desktop/Voice_PL.bank
       [Restrictions]
       Win32
       Win64
       HoloLens
       Mac
       XboxOne
       PS4
       IOS
       HTML5
       Linux
       LinuxAArch64
       AllDesktop
       TVOS
       Switch
       Lumin
       Windows
       Microsoft
       Apple
       Unix
       Sony
       XboxCommon
       Desktop
       EpicInternal
       CarefullyRedist
       NotForLicensees
       NoRedist
       If these files are intended to be distributed in packaged builds, move the source files out of a restricted folder, or remap them during staging using the following syntax in DefaultGame.ini:
       [Staging]
       +RemapDirectories=(From="Foo/NoRedist", To="Foo")
       Alternatively, whitelist them using this syntax in DefaultGame.ini:
       [Staging]
       +WhitelistDirectories=MyGame/Content/Foo
       (see O:\dev\UnrealEngine-PlatformerGame\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)

Been trying to fix the android build for a few weeks now, but I’m stuck. Would love to get help on it.

The platform specific documentation for Android mentions you need to put your banks in a Mobile subdirectory and make some modifications to the AndroidGame.ini file.
Here are the steps in more detail:

  1. Open {gamename}\Config\Android\ AndroidGame.ini (Create any folders or files that don’t already exists)
  2. In the file, paste the following text:
[/Script/UnrealEd.ProjectPackagingSettings]
-DirectoriesToAlwaysStageAsNonUFS=(Path="FMOD/Desktop")
+DirectoriesToAlwaysStageAsNonUFS=(Path="FMOD/Mobile")
  1. In {gamename}\Content\FMOD, create a folder called “Mobile”
  2. Copy and paste the banks in
    {gamename}\Content\FMOD\Desktop
    to
    {gamename}\Content\FMOD\Mobile

You should now be able to build to Android

Thanks for this. Fixed it for me.

Hi Jeff,
have any of the paths changed for 4.27? I’ve tried your solution as well as the one in the documentation, but still the build error occurs for me. Any ideas?
Thanks in advance!

The paths should still be the same, what version of FMOD are you using? Are you using any third party plugins in your project (e.g Resonance Audio), and is the error exactly the same as the originally reported one here?

Hi Jeff,
thanks for looking into this! Before and after following the steps you outlined in your earlier post the error message is the following (so pretty much the same as OP):

UATHelper: Packaging (Android (ASTC)): ERROR: The following files are set to be staged, but contain restricted folder names ("Desktop"):
UATHelper: Packaging (Android (ASTC)):        ProjectName/Content/FMOD/Desktop/Master.bank
UATHelper: Packaging (Android (ASTC)):        ProjectName/Content/FMOD/Desktop/Master.strings.bank
UATHelper: Packaging (Android (ASTC)):        [Restrictions]
UATHelper: Packaging (Android (ASTC)):        Win32
UATHelper: Packaging (Android (ASTC)):        Win64
UATHelper: Packaging (Android (ASTC)):        HoloLens
UATHelper: Packaging (Android (ASTC)):        Mac
UATHelper: Packaging (Android (ASTC)):        XboxOne
UATHelper: Packaging (Android (ASTC)):        PS4
UATHelper: Packaging (Android (ASTC)):        IOS
UATHelper: Packaging (Android (ASTC)):        HTML5
UATHelper: Packaging (Android (ASTC)):        Linux
UATHelper: Packaging (Android (ASTC)):        LinuxAArch64
UATHelper: Packaging (Android (ASTC)):        AllDesktop
UATHelper: Packaging (Android (ASTC)):        TVOS
UATHelper: Packaging (Android (ASTC)):        Switch
UATHelper: Packaging (Android (ASTC)):        Lumin
UATHelper: Packaging (Android (ASTC)):        Windows
UATHelper: Packaging (Android (ASTC)):        Microsoft
UATHelper: Packaging (Android (ASTC)):        Apple
UATHelper: Packaging (Android (ASTC)):        Unix
UATHelper: Packaging (Android (ASTC)):        Sony
UATHelper: Packaging (Android (ASTC)):        XboxCommon
UATHelper: Packaging (Android (ASTC)):        Desktop
UATHelper: Packaging (Android (ASTC)):        EpicInternal
UATHelper: Packaging (Android (ASTC)):        CarefullyRedist
UATHelper: Packaging (Android (ASTC)):        NotForLicensees
UATHelper: Packaging (Android (ASTC)):        NoRedist
UATHelper: Packaging (Android (ASTC)):        If these files are intended to be distributed in packaged builds, move the source files out of a restricted folder, or remap them during staging using the following syntax in DefaultGame.ini:
UATHelper: Packaging (Android (ASTC)):        [Staging]
UATHelper: Packaging (Android (ASTC)):        +RemapDirectories=(From="Foo/NoRedist", To="Foo")
UATHelper: Packaging (Android (ASTC)):        Alternatively, whitelist them using this syntax in DefaultGame.ini:
UATHelper: Packaging (Android (ASTC)):        [Staging]
UATHelper: Packaging (Android (ASTC)):        +WhitelistDirectories=MyGame/Content/Foo
UATHelper: Packaging (Android (ASTC)):        (see C:\Users\xxx\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.27\Log.txt for full exception trace)
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED

I’m using some other plugins in this project, but none of them audio related - also the project is building and running fine once I disable FMOD. I’m using plugin version 2.02.05 and Studio Version 2.02.05, so I should be up to date. Might it be something Source Control related? My UE4 project is under source control with Perforce, but my FMOD project isn’t since there is no collaboration on it. Do I need to set this up also?

Best