Unity 2022.3.44f1 - 任务“:launcher:checkReleaseDuplicateClasses”执行失败

问题描述 投票:0回答:1

在使用最新的 Google Play SDK 更新我的包后(阅读:从 Unity 中删除所有包并重新添加最新版本,因为没有其他方法可以在不出现大量错误的情况下执行此操作),我遇到了(希望,但我在开玩笑)阻止我构建的最终错误:

执行 com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable 时发生失败 在模块 core-1.2.0-runtime (androidx.core:core:1.2.0) 和 jetified-androidx.core.core-1.9.0-runtime (:androidx. core.core-1.9.0:)

我已经尝试过互联网上的各种解决方案。删除并重新添加外部依赖管理器。唉,这个问题一直失败。接下来我可以尝试什么?

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.9.0-runtime (:androidx.core.core-1.9.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.9.0-runtime (:androidx.core.core-1.9.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.9.0-runtime (:androidx.core.core-1.9.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.9.0-runtime (:androidx.core.core-1.9.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.9.0-runtime (:androidx.core.core-1.9.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.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.activity.Cancellable found in modules jetified-activity-1.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) 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.2.3-runtime (androidx.activity:activity:1.2.3) and jetified-androidx.activity.activity-1.0.0-runtime (:androidx.activity.activity-1.0.0:)
     Duplicate class androidx.arch.core.executor.ArchTaskExecutor found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
     Duplicate class androidx.arch.core.executor.ArchTaskExecutor$1 found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
     Duplicate class androidx.arch.core.executor.ArchTaskExecutor$2 found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
     Duplicate class androidx.arch.core.executor.DefaultTaskExecutor found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
     Duplicate class androidx.arch.core.executor.DefaultTaskExecutor$1 found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
     Duplicate class androidx.arch.core.executor.TaskExecutor found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
     Duplicate class androidx.arch.core.internal.FastSafeIterableMap found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.internal.SafeIterableMap found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.internal.SafeIterableMap$AscendingIterator found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.internal.SafeIterableMap$DescendingIterator found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.internal.SafeIterableMap$Entry found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.internal.SafeIterableMap$IteratorWithAdditions found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.internal.SafeIterableMap$ListIterator found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.internal.SafeIterableMap$SupportRemove found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.arch.core.util.Function found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.core.core-common-2.1.0.jar)
     Duplicate class androidx.collection.ArrayMap found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.ArrayMap$1 found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.ArraySet found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.ArraySet$1 found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.CircularArray found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.CircularIntArray found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.ContainerHelpers found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.LongSparseArray found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.LruCache found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.MapCollections found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.MapCollections$ArrayIterator found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.MapCollections$EntrySet found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.MapCollections$KeySet found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.MapCollections$MapIterator found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.MapCollections$ValuesCollection found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.SimpleArrayMap found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.collection.SparseArrayCompat found in modules collection-1.1.0 (androidx.collection:collection:1.1.0) and jetified-androidx.collection.collection-1.1.0 (androidx.collection.collection-1.1.0.jar)
     Duplicate class androidx.core.accessibilityservice.AccessibilityServiceInfoCompat found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityCompat found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityCompat$1 found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityCompat$OnRequestPermissionsResultCallback found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityCompat$PermissionCompatDelegate found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityCompat$RequestPermissionsRequestCodeValidator found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityCompat$SharedElementCallback21Impl found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityManagerCompat found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityOptionsCompat found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityOptionsCompat$ActivityOptionsCompatImpl found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityRecreator found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityRecreator$1 found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityRecreator$2 found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityRecreator$3 found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ActivityRecreator$LifecycleCheckCallbacks found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.AlarmManagerCompat found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.AppComponentFactory found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.AppLaunchChecker found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.AppOpsManagerCompat found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.BundleCompat found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ComponentActivity found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
     Duplicate class androidx.core.app.ComponentActivity$ExtraData found in <message truncated>
android unity-game-engine google-play-services googleads-mobile-unity
1个回答
0
投票

显然,这是解决办法: 在 PlayerSettings->Android->Publish Settings 中启用模板:

主摇篮
等级属性
渐变设置

© www.soinside.com 2019 - 2024. All rights reserved.