Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug Help me solve the problem

Discussion in 'Android' started by vadimshirokikh, Jul 31, 2023.

  1. vadimshirokikh

    vadimshirokikh

    Joined:
    Feb 22, 2020
    Posts:
    4
    When trying to compile my game for android I get the same errors


    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:mergeReleaseNativeLibs NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:copyReleaseJniLibsProjectOnly UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:generateReleaseResValues UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:generateReleaseResources UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:packageReleaseResources UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:parseReleaseLocalResources UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:processReleaseManifest UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:generateReleaseRFile UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:generateReleaseBuildConfig UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:javaPreCompileRelease UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:bundleLibCompileToJarRelease UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:stripReleaseDebugSymbols NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:copyReleaseJniLibsProjectAndLocalJars UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:extractDeepLinksForAarRelease UP-TO-DATE
    > Task :launcher:preBuild UP-TO-DATE
    > Task :launcher:preReleaseBuild UP-TO-DATE
    > Task :launcher:generateReleaseBuildConfig UP-TO-DATE
    > Task :launcher:javaPreCompileRelease UP-TO-DATE
    > Task :launcher:generateReleaseResValues UP-TO-DATE
    > Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
    > Task :launcher:extractProguardFiles UP-TO-DATE
    > Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:extractReleaseAnnotations UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:mergeReleaseGeneratedProguardFiles UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:mergeReleaseConsumerProguardFiles UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:mergeReleaseShaders UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:compileReleaseShaders NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:packageReleaseAssets UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:prepareLintJarForPublish UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:prepareReleaseArtProfile UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:mergeReleaseJavaResource UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:syncReleaseLibJars UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:writeReleaseAarMetadata UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:bundleReleaseLocalLintAar UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:extractDeepLinksRelease UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:compileReleaseLibraryResources UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:bundleLibResRelease NO-SOURCE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:bundleLibRuntimeToJarRelease UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:createFullJarRelease UP-TO-DATE
    > Task :unityLibrary:YandexMobileAdsPlugin.androidlib:writeReleaseLintModelMetadata UP-TO-DATE
    > Task :launcher:checkReleaseDuplicateClasses FAILED
    > Task :unityLibrary:configureCMakeRelWithDebInfo[arm64-v8a]
    > Task :launcher:desugarReleaseFileDependencies
    38 actionable tasks: 3 executed, 35 up-to-date

    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)





    FAILURE: Build 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.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class androidx.activity.Cancellable found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$1 found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$2 found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$3 found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$NonConfigurationInstances found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ImmLeaksCleaner found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedCallback found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcher found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcher$LifecycleOnBackPressedCancellable found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcher$OnBackPressedCancellable found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcherOwner found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.annotation.AnimRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AnimatorRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AnyRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AnyThread found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ArrayRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AttrRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.BinderThread found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.BoolRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.CallSuper found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.CheckResult found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ChecksSdkIntAtLeast found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ColorInt found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ColorLong found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ColorRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ContentView found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.DimenRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.Dimension found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.DoNotInline found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.DrawableRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.FloatRange found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.FontRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.FractionRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.GuardedBy found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.HalfFloat found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IdRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty$EnumEntry found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty$FlagEntry found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty$ValueType found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IntDef found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IntRange found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IntegerRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InterpolatorRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.Keep found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.LayoutRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.LongDef found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.MainThread found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.MenuRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.NavigationRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.NonNull found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.Nullable found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.OptIn found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.3.0-runtime (androidx.annotation:annotation-experimental:1.3.0)
    Duplicate class androidx.annotation.PluralsRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.Px found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RawRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RequiresApi found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RequiresFeature found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RequiresOptIn found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.3.0-runtime (androidx.annotation:annotation-experimental:1.3.0)
    Duplicate class androidx.annotation.RequiresOptIn$Level found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.3.0-runtime (androidx.annotation:annotation-experimental:1.3.0)
    Duplicate class androidx.annotation.RequiresPermission found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RequiresPermission$Read found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RequiresPermission$Write found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RestrictTo found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.RestrictTo$Scope found in modules annot<message truncated>



    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Unity\Hub\Editor\2023.2.0b2\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2023.2.0b2\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    Environment Variables:
    PROCESSOR_ARCHITECTURE = AMD64
    GATEWAY_VM_OPTIONS = C:\jetbra\vmoptions\gateway.vmoptions
    DriverData = C:\Windows\System32\Drivers\DriverData
    USERDOMAIN = DESKTOP-MFT2JOD
    CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
    COMPUTERNAME = DESKTOP-MFT2JOD
    DEBUG_ENV_VAR = UnityHub
    LOGONSERVER = \\DESKTOP-MFT2JOD
    PUBLIC = C:\Users\Public
    ProgramData = C:\ProgramData
    SESSIONNAME = Console
    ALLUSERSPROFILE = C:\ProgramData
    SystemRoot = C:\WINDOWS
    windir = C:\WINDOWS
    ProgramFiles(x86) = C:\Program Files (x86)
    ProgramW6432 = C:\Program Files
    OS = Windows_NT
    DATAGRIP_VM_OPTIONS = C:\jetbra\vmoptions\datagrip.vmoptions
    PROCESSOR_IDENTIFIER = AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD
    HEAP_CLIENT_TOKEN_STAGING = 3786794399
    HOMEPATH = \Users\ANDKFOX
    DATASPELL_VM_OPTIONS = C:\jetbra\vmoptions\dataspell.vmoptions
    CLION_VM_OPTIONS = C:\jetbra\vmoptions\clion.vmoptions
    PHPSTORM_VM_OPTIONS = C:\jetbra\vmoptions\phpstorm.vmoptions
    CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_10892_TREITHWACWHPFFAX
    PROCESSOR_LEVEL = 23
    CommonProgramFiles = C:\Program Files\Common Files
    RIDER_VM_OPTIONS = C:\jetbra\vmoptions\rider.vmoptions
    JETBRAINS_CLIENT_VM_OPTIONS = C:\jetbra\vmoptions\jetbrains_client.vmoptions
    DEVECOSTUDIO_VM_OPTIONS = C:\jetbra\vmoptions\devecostudio.vmoptions
    USERDOMAIN_ROAMINGPROFILE = DESKTOP-MFT2JOD
    TEMP = C:\Users\ANDKFOX\AppData\Local\Temp
    CommonProgramW6432 = C:\Program Files\Common Files
    RUBYMINE_VM_OPTIONS = C:\jetbra\vmoptions\rubymine.vmoptions
    JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2023.2.0b2\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
    APPCODE_VM_OPTIONS = C:\jetbra\vmoptions\appcode.vmoptions
    HOMEDRIVE = C:
    AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
    LAUNCH_DARKLY_CLIENT_TOKEN = 60a7e30fafc7e60e33446283
    USERNAME = ANDKFOX
    OneDrive = C:\Users\ANDKFOX\OneDrive
    PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    NUMBER_OF_PROCESSORS = 4
    LAUNCH_DARKLY_CLIENT_TOKEN_STAGING = 60a7e30fafc7e60e33446282
    WEBIDE_VM_OPTIONS = C:\jetbra\vmoptions\webide.vmoptions
    PYCHARM_VM_OPTIONS = C:\jetbra\vmoptions\pycharm.vmoptions
    ProgramFiles = C:\Program Files
    GOLAND_VM_OPTIONS = C:\jetbra\vmoptions\goland.vmoptions
    ComSpec = C:\WINDOWS\system32\cmd.exe
    WEBSTORM_VM_OPTIONS = C:\jetbra\vmoptions\webstorm.vmoptions
    ORIGINAL_XDG_CURRENT_DESKTOP = undefined
    PROCESSOR_REVISION = 0802
    JETBRAINSCLIENT_VM_OPTIONS = C:\jetbra\vmoptions\jetbrainsclient.vmoptions
    TMP = C:\Users\ANDKFOX\AppData\Local\Temp
    IDEA_VM_OPTIONS = C:\jetbra\vmoptions\idea.vmoptions
    SystemDrive = C:
    AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
    OneDriveConsumer = C:\Users\ANDKFOX\OneDrive
    SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
    HEAP_CLIENT_TOKEN = 1717415662
    APPDATA = C:\Users\ANDKFOX\AppData\Roaming
    Path = C:\Program Files\Eclipse Adoptium\jdk-8.0.382.5-hotspot\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Users\ANDKFOX\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\ANDKFOX\AppData\Local\Programs\Python\Python310\;C:\Users\ANDKFOX\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\ANDKFOX\AppData\Local\Programs\Python\Python311\;C:\Users\ANDKFOX\AppData\Local\Microsoft\WindowsApps;C:\Users\ANDKFOX\.dotnet\tools;C:\Users\ANDKFOX\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Java\jdk-11\bin;
    STUDIO_VM_OPTIONS = C:\jetbra\vmoptions\studio.vmoptions
    PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
    LOCALAPPDATA = C:\Users\ANDKFOX\AppData\Local
    USERPROFILE = C:\Users\ANDKFOX
    WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3


    stderr[

    FAILURE: Build 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.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
    Duplicate class androidx.activity.Cancellable found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$1 found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$2 found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$3 found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ComponentActivity$NonConfigurationInstances found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.ImmLeaksCleaner found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedCallback found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcher found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcher$LifecycleOnBackPressedCancellable found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcher$OnBackPressedCancellable found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.activity.OnBackPressedDispatcherOwner found in modules jetified-activity-1.6.0-runtime (androidx.activity:activity:1.6.0) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
    Duplicate class androidx.annotation.AnimRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AnimatorRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AnyRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AnyThread found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ArrayRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.AttrRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.BinderThread found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.BoolRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.CallSuper found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.CheckResult found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ChecksSdkIntAtLeast found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ColorInt found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ColorLong found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ColorRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.ContentView found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.DimenRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.Dimension found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.DoNotInline found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.DrawableRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.FloatRange found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.FontRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.FractionRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.GuardedBy found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.HalfFloat found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IdRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty$EnumEntry found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty$FlagEntry found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InspectableProperty$ValueType found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IntDef found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IntRange found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.IntegerRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.InterpolatorRes found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.Keep found in modules annotation-1.3.0 (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.2.0 (androidx.annotation.annotation-1.2.0.jar)
    Duplicate class androidx.annotation.LayoutRes found in modules annota<message truncated>



    Build completed with a result of 'Failed' in 656 seconds (656455 ms)
    3 errors
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)



    From other plugins I use only Yandex Mobile Ads SDK
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,949
    Do have you GameActivity set in PlayerSettings->Android->Application Entry Point, setting to Activity might temporarily fix it.

    The other option, is to enable templates in PlayerSettings->Android->Publish Settings:
    * Main Gradle
    * Gradle Properties
    * Gradle Settings
     
    Last edited: Feb 1, 2024
  3. vadimshirokikh

    vadimshirokikh

    Joined:
    Feb 22, 2020
    Posts:
    4

    thanks for your help!
     
  4. marinhoz

    marinhoz

    Joined:
    Mar 26, 2022
    Posts:
    2
    did it work? could you fix this? i am literally having this same errors.
     
    burakyildizhan321 likes this.
  5. burakyildizhan321

    burakyildizhan321

    Joined:
    Jun 11, 2022
    Posts:
    5
    I've been dealing with this problem for a week. Could you solve it?
     
  6. burakyildizhan321

    burakyildizhan321

    Joined:
    Jun 11, 2022
    Posts:
    5
    If you use admob and faced with duplicate class error like this. Firstly, Assets -> External Dependecy Manager -> Android Resolver -> Delete Resoved Libraries. After that, Assets -> External Dependecy Manager -> Android Resolver -> Settings -> Enable Resolution On Build. It works for me.