When build aab comes out CommandInvokationFailure: Gradle build failed

when i build aab shows this error , how can i fix it, need help

CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.3.45f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2021.3.45f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.5.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “bundleRelease”

Environment Variables:
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
USERDOMAIN = MINT
ProgramFiles = C:\Program Files
TMP = C:\Users\poloi\AppData\Local\Temp
OneDrive = C:\Users\poloi\OneDrive
PROCESSOR_ARCHITECTURE = AMD64
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
OneDriveConsumer = C:\Users\poloi\OneDrive
OS = Windows_NT
CHROME_CRASHPAD_PIPE_NAME = \.\pipe\crashpad_12140_HGQYRYFPPNLGGPED
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 151 Stepping 2, GenuineIntel
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
PROCESSOR_REVISION = 9702
EFC_8728 = 1
ProgramW6432 = C:\Program Files
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
CommonProgramFiles = C:\Program Files\Common Files
DriverData = C:\Windows\System32\Drivers\DriverData
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2021.3.45f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
AMPLITUDE_TOKEN_GREENBUCKET_PROD = ZpUcbAdZXJYzNSoHsAWtL_s_JppwWid9
ComSpec = C:\Windows\system32\cmd.exe
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
LOGONSERVER = \MINT
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2021.3.45f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
SystemRoot = C:\Windows
IGCCSVC_DB = AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAl3nSKKc22EipsxGmRjeibgQAAAACAAAAAAAQZgAAAAEAACAAAADx7wkM8v0TE1S2k1Ykk9DHAxkXOMs0Epzd86tCNQgkeAAAAAAOgAAAAAIAACAAAAAX+4ycNXe23//BTlPJXDmFDYrJXT44D8CKIlJGjCv7/mAAAAAwy8SLGFlAe/ccOLcgs0SHEjhxddcTWGAsNtGeyi/V/NgnE9M9UcYy7mARz59VYNR8pZKQ3KA6QUvwXJ+oS3LCHpLVYgm3AqOvOQfV2JI9ZSSoHnY7a6nTZW4wfW6532dAAAAAQ2oFI4yRtfUFj8//1caUkYD1qi3tkQqCadVq2CaJ66+FNenZDsAwj0EiahKJrb/gz4ahl0Rvw1Rv8exkNOQS0g==
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
DEBUG_ENV_VAR = UnityHub
SESSIONNAME = Console
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
TEMP = C:\Users\poloi\AppData\Local\Temp
Path = C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\WireGuard;C:\Users\poloi\AppData\Local\Microsoft\WindowsApps;C:\Users\poloi\AppData\Roaming\npm;D:\Users\poloi\AppData\Local\Programs\Microsoft VS Code\bin
USERNAME = poloi
COMPUTERNAME = MINT
AMPLITUDE_API_KEY_REDBUCKET_PROD = ca12bb461ea96f9bdf5df4ded7d52994
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
ALLUSERSPROFILE = C:\ProgramData
SystemDrive = C:
windir = C:\Windows
AMPLITUDE_TOKEN_REDBUCKET_PROD = jTIgKs5KTZOjiqEEVdZFbgo_VRhABduL
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
ZES_ENABLE_SYSMAN = 1
PUBLIC = C:\Users\Public
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
APPDATA = C:\Users\poloi\AppData\Roaming
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
PROCESSOR_LEVEL = 6
CommonProgramW6432 = C:\Program Files\Common Files
ProgramFiles(x86) = C:\Program Files (x86)
USERPROFILE = C:\Users\poloi
AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
LOCALAPPDATA = C:\Users\poloi\AppData\Local
HOMEPATH = \Users\poloi
ProgramData = C:\ProgramData
HOMEDRIVE = C:
USERDOMAIN_ROAMINGPROFILE = MINT
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
NUMBER_OF_PROCESSORS = 20

stderr[

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class android.support.v4.app.RemoteActionCompatParcelizer found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:)
Duplicate class androidx.annotation.AnimRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AnimatorRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AnyRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AnyThread found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.ArrayRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AttrRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.BinderThread found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.BoolRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.CallSuper found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.CheckResult found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.ColorInt found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.ColorLong found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.ColorRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.ContentView found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.DimenRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.Dimension found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.DrawableRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.FloatRange found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.FontRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.FractionRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.GuardedBy found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.HalfFloat found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.IdRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.InspectableProperty found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.InspectableProperty$EnumEntry found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.InspectableProperty$FlagEntry found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.InspectableProperty$ValueType found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.IntDef found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.IntRange found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.IntegerRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.InterpolatorRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.Keep found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.LayoutRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.LongDef found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.MainThread found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.MenuRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.NavigationRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.NonNull found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.Nullable found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.PluralsRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.Px found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.RawRes found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.RequiresApi found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.RequiresFeature found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.RequiresPermission found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.RequiresPermission$Read found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.RequiresPermission$Write found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.RestrictTo found in modules annotation-1.1.0 (androidx.annotation:annotation:1.1.0) and jetified-androidx.annotation.annotation-1.1.0 (andr

Try recreating your custom templates (backup current ones just in case) and resolving dependencies.

1 Like