Hello,
I had a project that worked fine with 4.18. After a while and updating to 4.20, I convert in place my project (bad idea) and I can’t manage to package it anymore. Not sure this has anything to do with the 4.20 but it was the main change.
It seems that the error is linked to gradle as I get:
:app:mergeDebugResourcesC:\Users\J?r?mie\.gradle\caches\transforms-1\files-1.1\play-services-base-11.8.0.aar\ed3fd0fb06d8d84f96fc82cb75dba62a\res\drawable\common_google_signin_btn_text_disabled.xml: error: file not found.
C:\Users\J?r?mie\.gradle\caches\transforms-1\files-1.1\play-services-base-11.8.0.aar\ed3fd0fb06d8d84f96fc82cb75dba62a\res\drawable-hdpi-v4\common_google_signin_btn_icon_dark_normal_background.png: error: file not found.
And this goes on for several files that exists. It ends with some AAPT2 error:
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
After opening the log file, I read:
<>c.<PrintExceptionInfo>b__4_1: ==============================================================================
<>c.<PrintExceptionInfo>b__4_0: ERROR: cmd.exe failed with args /c "D:\UE4 Projects\Pumpat_Runner\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleDebug
<>c.<PrintExceptionInfo>b__4_0: (see C:\Users\Jérémie\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE4+Projects+UE_4.20\Log.txt for full exception trace)
<>c.<PrintExceptionInfo>b__4_1:
<>c.<PrintExceptionInfo>b__4_1: BuildException: cmd.exe failed with args /c "D:\UE4 Projects\Pumpat_Runner\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleDebug
<>c.<PrintExceptionInfo>b__4_1: à UnrealBuildTool.UEDeployAndroid.RunCommandLineProgramWithException(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:ligne 1406
<>c.<PrintExceptionInfo>b__4_1: à UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, TargetType InTargetType, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk, Boolean bDisallowExternalFilesDir) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:ligne 3838
<>c.<PrintExceptionInfo>b__4_1: à UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:ligne 3990
<>c.<PrintExceptionInfo>b__4_1: à AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Android\AndroidPlatform.Automation.cs:ligne 403
<>c.<PrintExceptionInfo>b__4_1: à Project.Package(ProjectParams Params, Int32 WorkingCL) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\PackageCommand.Automation.cs:ligne 37
<>c.<PrintExceptionInfo>b__4_1: à BuildCookRun.DoBuildCookRun(ProjectParams Params) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:ligne 220
<>c.<PrintExceptionInfo>b__4_1: à BuildCookRun.ExecuteBuild() dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:ligne 41
<>c.<PrintExceptionInfo>b__4_1: à AutomationTool.BuildCommand.Execute() dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:ligne 112
<>c.<PrintExceptionInfo>b__4_1: à AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:ligne 562
<>c.<PrintExceptionInfo>b__4_1: à AutomationTool.Automation.Process(String[] Arguments, StartupTraceListener StartupListener) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:ligne 532
<>c.<PrintExceptionInfo>b__4_1: à AutomationTool.Program.MainProc(String[] Arguments, StartupTraceListener StartupListener) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:ligne 174
<>c.<PrintExceptionInfo>b__4_1: à AutomationTool.Program.<>c__DisplayClass1_0.<Main>b__0() dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:ligne 100
<>c.<PrintExceptionInfo>b__4_1: à AutomationTool.InternalUtils.RunSingleInstance(Func`1 Main) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:ligne 725
<>c.<PrintExceptionInfo>b__4_1: à AutomationTool.Program.Main() dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:ligne 100
<>c.<PrintExceptionInfo>b__4_1: ==============================================================================
Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
I tried the different solutions from:
From my project settings:
I tried to package by disabling gradle and using ant (by unchecking the box: enable gradle instead of ant). The packaging then completes only if “For distribution” is unchecked. However, the compiled apk crashes right when opening.
If anyone have any idea, I’m more than willing to give it a shot.
Regards