[5.1] 'Missing precompiled manifest' error when building code plugin for Android

Hi,

I try to build some code plugins for marketplace release for 5.1 for Android platform. Unfortunately I get and error:

NDK toolchain: r21e, NDK version: 210500, ClangVersion: 9.0.9
Parsing headers for UnrealGame
  Running Internal UnrealHeaderTool C:\Users\Dawid\Downloads\PluginBuildDir\CooldownComponent\HostProject\HostProject.uproject C:\Users\Dawid\Downloads\PluginBuildDir\CooldownComponent\HostProject\Intermediate\Build\Android\arm64\UnrealGame\Development\UnrealGame.uhtmanifest -WarningsAsErrors -installed
Total of 6 written
Reflection code generated for UnrealGame in 0.9663007 seconds
Missing precompiled manifest for 'Launch', 'C:\Program Files\Epic Games\UE_5.1\Engine\Intermediate\Build\Android\arm64\UnrealGame\Development\Launch\Launch.precompiled'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in Launch.build.cs to override. If part of a plugin, also check if its 'Type' is correct.

The command i’m using is:

RunUAT.bat BuildPlugin -Plugin="C:\...\CooldownComponentPlugin.uplugin" -Package="C:\...CooldownComponent" -TargetPlatforms=Win64+Android -Rocket

Note that it only fails when compiling for Android, Windows is OK. Exactly the same command works firne for 5.0 and 4.27.

What I’ve tried:

  1. Upgrade android sdk’s and ndk’s (but maybe I messed something up?)
  2. Put some random stuff into .build.cs:
        PrecompileForTargets = PrecompileTargetsType.Any;
        Type = ModuleType.CPlusPlus;
        bUsePrecompiled = true;

6 Likes

I have the same bug. :frowning:

Having the same issue here, can’t push updates to the marketplace :frowning:

It looks like the files exist, they’re just not in the correct folder. For whatever reason the unreal is looking for:

…/Intermediate/Build/Android/arm64/UnrealGame/…

while the files are in

…/Intermediate/Build/Android/UnrealGame/…

I’m not sure what’s the root of the problem, but this can hopefully help someone figure it out.

1 Like

+1

My friend @Daniel_The_S wrote a quick perl script that you can use to generate a batch file that will create a junctions for all the folders for the problem directories. (Please only use if you know what you’re doing. I won’t be able to give you any support. This is only a quick workaround.)

use v5.30;

open my $F, "cmd /c dir /ad /s /b|";
while ( <$F> )
{
    chomp;
    next unless /Intermediate\\Build\\Android$/;
    my $androidDir = $_;
    my $arm64Dir = "$androidDir\\arm64";
    my $unrealGameDir = "$androidDir\\UnrealGame";
    next unless -d $unrealGameDir;
    unless ( -d $arm64Dir )
    {
        say "mkdir \"$arm64Dir\"";
    }
    my $newUnrealDir = "$arm64Dir\\UnrealGame";
    unless ( -d $newUnrealDir )
    {
        say "mklink /j \"$newUnrealDir\" \"$unrealGameDir\"";
    }

}
close $F;

Just run the script in the engine directory from command line and output it to a file:

perl script.pl > fixPlugins.bat

and then run the generated .bat file as an administrator. You should be able to package your plugin now.

Hi,

this solution (if it works, I didn’t test it) will compile plugin on our local machines. But the compilation will still fail on epic side? As far as I understand (hovewer i am new marketplace seller), they compile plugins themselves with aforementioned command. So this is not a solution for marketplace sellers, just for people wanting to locally compile plugin.

Hi, yes this works only when you’re trying to package the plugin yourself. Since this looks like an engine problem I hope that Epic will be able to fix this issue themselves when they’re compiling the plugins. Of course I might be wrong and it’s some configuration issue that’s needed for 5.1.

This works great, wonder if someone has similar for OS X

You can try this script (I don’t have any plugins that I can test it with, but it seems to setup the file system correctly):

#!/usr/bin/perl
use v5.30;

my $doit = $ARGV[0] eq "--doit";

open my $F, "find . -type d -print|";
while ( <$F> )
{
    chomp;
    next unless m#Intermediate/Build/Android$#;
    my $androidDir = $_;
    my $arm64Dir = "$androidDir/arm64";
    my $unrealGameDir = "$androidDir/UnrealGame";
    next unless -d $unrealGameDir;
    unless ( -d $arm64Dir )
    {
        say "Creating \"$arm64Dir\"";
        mkdir($arm64Dir) if $doit;
    }
    my $newUnrealDir = "$arm64Dir/UnrealGame";
    unless ( -d $newUnrealDir )
    {
      my $relativeLink = "../UnrealGame";
      say "Linking \"$relativeLink\" to \"$newUnrealDir\"";
      symlink($relativeLink, $newUnrealDir) if $doit;
    }
}
close $F;

Put it in a file called fixdirs.pl, chmod to 755 and run it. It will show what it is going to do. If it looks good, you can re-run it with fixdirs.pl --doit and it will actually make the changes.

Hi, thanks for the report, and the workarounds posted. We’ll make sure we get this fixed for 5.1.1 and we will also post the UBT/UAT code fix once we have it.

2 Likes

Hi Jack, are you from epic staff? Is this confirmation that epic engineers know about the issue and will fix it?

cheers

Yes, Jack’s an Epic staff member—and as he said, the team is aware of the issue and plan to fix for 5.1.1.

Thanks for reporting it!

1 Like

We are facing the same issue. Our plugin recently added support for Android. So, that means we cannot push updates because RunUAT fails for the Android target.

Is it possible to just push the update for 4.27 and 5.0 until this is fixed in 5.1.1?

Im on 5.3 and don’t see this as solution.

I used Unreal Plugin named “Functional Tests” for testing. And I don’t know how to remove it to cook shipping build