I fixed the error.
The issue was in my Build.cs file. I copied some code from the Meta Unreal-SharedSpaces project and this is what was causing the error:
if (Target.Platform == UnrealTargetPlatform.Android && Target.Configuration == UnrealTargetConfiguration.Shipping)
{
var manifestFile = Path.Combine(ModuleDirectory, “AndroidSanitizePermissions_UPL.xml”);
AdditionalPropertiesForReceipt.Add(“AndroidPlugin”, manifestFile);
}