Package Project Android Error Code

I keep getting following error code, while trying to package my Project.

UATHelper: Packaging (Android (ASTC)): Making .aab with Gradle…
UATHelper: Packaging (Android (ASTC)): To honour the JVM settings for this build a single-use Daemon process will be forked. See The Gradle Daemon.
UATHelper: Packaging (Android (ASTC)): Daemon will be stopped at the end of the build
UATHelper: Packaging (Android (ASTC)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ASTC)): * What went wrong:
UATHelper: Packaging (Android (ASTC)): A problem occurred configuring root project ‘app’.
UATHelper: Packaging (Android (ASTC)): > Could not resolve all files for configuration ‘:classpath’.
UATHelper: Packaging (Android (ASTC)): > Could not resolve com.android.tools.build:gradle:7.4.2.
UATHelper: Packaging (Android (ASTC)): Required by:
UATHelper: Packaging (Android (ASTC)): project :
UATHelper: Packaging (Android (ASTC)): > No matching variant of com.android.tools.build:gradle:7.4.2 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute ‘org.gradle.plugin.api-version’ with value ‘7.5’ but:
UATHelper: Packaging (Android (ASTC)): - Variant ‘apiElements’ capability com.android.tools.build:gradle:7.4.2 declares a library, packaged as a jar, and its dependencies declared externally:
UATHelper: Packaging (Android (ASTC)): - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
UATHelper: Packaging (Android (ASTC)): - Other compatible attribute:
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)
UATHelper: Packaging (Android (ASTC)): - Variant ‘javadocElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a component, and its dependencies declared externally:
UATHelper: Packaging (Android (ASTC)): - Incompatible because this component declares documentation and the consumer needed a library
UATHelper: Packaging (Android (ASTC)): - Other compatible attributes:
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about its target Java version (required compatibility with Java 8)
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about its elements (required them packaged as a jar)
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)
UATHelper: Packaging (Android (ASTC)): - Variant ‘runtimeElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
UATHelper: Packaging (Android (ASTC)): - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
UATHelper: Packaging (Android (ASTC)): - Other compatible attribute:
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)
UATHelper: Packaging (Android (ASTC)): - Variant ‘sourcesElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a component, and its dependencies declared externally:
UATHelper: Packaging (Android (ASTC)): - Incompatible because this component declares documentation and the consumer needed a library
UATHelper: Packaging (Android (ASTC)): - Other compatible attributes:
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about its target Java version (required compatibility with Java 8)
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about its elements (required them packaged as a jar)
UATHelper: Packaging (Android (ASTC)): - Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)
UATHelper: Packaging (Android (ASTC)): * Try:
UATHelper: Packaging (Android (ASTC)): > Run with --stacktrace option to get the stack trace.
UATHelper: Packaging (Android (ASTC)): > Run with --info or --debug option to get more log output.
UATHelper: Packaging (Android (ASTC)): > Run with --scan to get full insights.
UATHelper: Packaging (Android (ASTC)): * Get more help at https://help.gradle.org
UATHelper: Packaging (Android (ASTC)): BUILD FAILED in 8s
UATHelper: Packaging (Android (ASTC)): cmd.exe failed with args /c “C:\Users\Baris\Documents\Unreal Projects\BallyDot1\Intermediate\Android\gradle\rungradle.bat” :app:bundleDebug
UATHelper: Packaging (Android (ASTC)): (see C:\Users\Baris\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.3\Log.txt for full exception trace)
UATHelper: Packaging (Android (ASTC)): AutomationTool executed for 0h 0m 50s
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED
PackagingResults: Error: Unknown Error

see C:\Users\Baris\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.3\Log.txt for full exception

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘app’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve com.android.tools.build:gradle:7.4.2.
Required by:
project :
No matching variant of com.android.tools.build:gradle:7.4.2 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute ‘org.gradle.plugin.api-version’ with value ‘7.5’ but:
- Variant ‘apiElements’ capability com.android.tools.build:gradle:7.4.2 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)
- Variant ‘javadocElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn’t say anything about its target Java version (required compatibility with Java 8)
- Doesn’t say anything about its elements (required them packaged as a jar)
- Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)
- Variant ‘runtimeElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)
- Variant ‘sourcesElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn’t say anything about its target Java version (required compatibility with Java 8)
- Doesn’t say anything about its elements (required them packaged as a jar)
- Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.5’)

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 10s

cmd.exe failed with args /c “C:\Users\Baris\Documents\Unreal Projects\BallyDot1\Intermediate\Android\gradle\rungradle.bat” :app:bundleDebug
(see C:\Users\Baris\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.3\Log.txt for full exception trace)

BuildException: cmd.exe failed with args /c “C:\Users\Baris\Documents\Unreal Projects\BallyDot1\Intermediate\Android\gradle\rungradle.bat” :app:bundleDebug
at UnrealBuildTool.UEDeployAndroid.RunCommandLineProgramWithExceptionAndFiltering(String WorkingDirectory, String Command, String Params, ILogger Logger, String OverrideDesc, Boolean bUseShellExecute) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:line 1845
at UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, TargetType InTargetType, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, UnrealTargetConfiguration Configuration, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk, Boolean bDisallowExternalFilesDir, Boolean bSkipGradleBuild) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:line 5230
at UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, UnrealTargetConfiguration Configuration, Boolean bIsDataDeploy, Boolean bSkipGradleBuild) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:line 5455
at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Android\AndroidPlatform.Automation.cs:line 0
at AutomationScripts.Project.Package(ProjectParams Params, Int32 WorkingCL) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\PackageCommand.Automation.cs:line 49
at BuildCookRun.DoBuildCookRun(ProjectParams Params) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 237
at BuildCookRun.ExecuteBuild() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 43
at AutomationTool.BuildCommand.Execute() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 345
at AutomationTool.BuildCommand.ExecuteAsync() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 354
at AutomationTool.Automation.ExecuteAsync(List1 CommandsToExecute, Dictionary2 Commands) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 265
at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 164

AutomationTool executed for 0h 0m 50s
AutomationTool exiting with ExitCode=1 (Error_Unknown)

Sounds like you never configured your environment.
You may want to break open the documentation on setting up Android publishing.

You have to install node, get the relevant stuff etc.

No sense in posting more logs…

I already installed the needed things

Obviously you didn’t.
The message is pretty specific. You either did not install the package or skipped the configuration steps for Node.

Oh, additionally, from personal experience.
Don’t use “Latest” anywhere in the sdk.
Manually mark the version you need to publish for, and keep it locked to that…

If some day you upgrade, you swap it, but it prevents things changing for builds based on feature changes as well as ensuring you can build some distant day in the future…