Search Unity

Bug Building Android fails because of Duplicate Classes with AndroidX Modules

Discussion in 'Editor & General Support' started by terrence_skill, Aug 1, 2022.

  1. terrence_skill

    terrence_skill

    Joined:
    Aug 2, 2021
    Posts:
    11
    Hi, I have a problem with building on Android Platform.

    Within the Build Process the Gradle Build fails.
    I am working on Unity 2021.3.5f1

    Here is the Error Message:

    CommandInvokationFailure: Gradle build failed.
    /Applications/Unity/Hub/Editor/2019.4.18f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2021.3.5f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    Note: /Users/Iggy/Desktop/100Apps/Puzzle Match/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/src/main/java/com/unity3d/player/UnityPlayerActivity.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
    > 1 exception was raised by workers:
    java.lang.RuntimeException: Duplicate class android.support.v4.app.RemoteActionCompatParcelizer found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class android.support.v4.os.ResultReceiver found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class android.support.v4.os.ResultReceiver$1 found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.accessibilityservice.AccessibilityServiceInfoCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityCompat$1 found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityCompat$OnRequestPermissionsResultCallback found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityCompat$PermissionCompatDelegate found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityCompat$RequestPermissionsRequestCodeValidator found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityCompat$SharedElementCallback21Impl found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityCompat$SharedElementCallback21Impl$1 found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityManagerCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityOptionsCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityOptionsCompat$ActivityOptionsCompatImpl found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityRecreator found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityRecreator$1 found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityRecreator$2 found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityRecreator$3 found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ActivityRecreator$LifecycleCheckCallbacks found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.AlarmManagerCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.AppComponentFactory found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.AppLaunchChecker found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.AppOpsManagerCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.BundleCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.BundleCompat$BundleCompatBaseImpl found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ComponentActivity found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.ComponentActivity$ExtraData found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.CoreComponentFactory found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.CoreComponentFactory$CompatWrapped found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.DialogCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.FrameMetricsAggregator found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.FrameMetricsAggregator$FrameMetricsApi24Impl found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.FrameMetricsAggregator$FrameMetricsApi24Impl$1 found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.FrameMetricsAggregator$FrameMetricsBaseImpl found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.FrameMetricsAggregator$MetricType found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.INotificationSideChannel found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.INotificationSideChannel$Stub found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.INotificationSideChannel$Stub$Proxy found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$CommandProcessor found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$CompatJobEngine found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$CompatWorkEnqueuer found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$CompatWorkItem found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$GenericWorkItem found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$JobServiceEngineImpl found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$JobServiceEngineImpl$WrapperWorkItem found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$JobWorkEnqueuer found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.JobIntentService$WorkEnqueuer found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NavUtils found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationBuilderWithBuilderAccessor found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Action found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Action$Builder found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Action$Extender found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Action$SemanticAction found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Action$WearableExtender found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$BadgeIconType found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$BigPictureStyle found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$BigTextStyle found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Builder found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$CarExtender found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$CarExtender$UnreadConversation found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$CarExtender$UnreadConversation$Builder found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$DecoratedCustomViewStyle found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Extender found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$GroupAlertBehavior found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$InboxStyle found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$MessagingStyle found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$MessagingStyle$Message found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$NotificationVisibility found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$StreamType found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$Style found in modules jetified-androidx.core.core-1.6.0-runtime.jar :)androidx.core.core-1.6.0:) and jetified-core-1.1.0.jar (core-1.1.0.jar)
    Duplicate class androidx.core.app.NotificationCompat$WearableExtender found in modul<message truncated>

    I don't know where these modules are located and what to do to solve the issue. I am not able to disable the Jetifier in Play Service Resolver.

    Does anyone have a clue?
     
    epernigo and krisna93 like this.
  2. GoodzilaGD

    GoodzilaGD

    Joined:
    Jul 29, 2019
    Posts:
    1
    any fixes?
     
    epernigo likes this.
  3. epernigo

    epernigo

    Joined:
    Sep 24, 2019
    Posts:
    11
    we have exactly the same log. Did anyone find a solution?
     
  4. GediminasR

    GediminasR

    Unity Technologies

    Joined:
    Aug 19, 2021
    Posts:
    53
    Hello,

    Would you kindly please report this issue via the Bug Reporter tool?
    https://unity.com/releases/editor/qa/bug-reporting

    Please make sure to write the exact steps needed to be taken so that the reproduction would be visually seen. Also make sure to attach a reproduction project and any visual material so that when testing our CQA team can verify that they got the same results. If you can, please use this template:

    How to reproduce:
    1. Open the attached project
    2. Do this
    3. Do that
    4. Select this
    5. Observe that

    Expected result: Something is visible, something is printed or something happens
    Actual result: The opposite of what I expect happens

    Reproducible with: Editor version I am using (e.g: 2021.3.xf1)

    Reproduced on: The OS I am on (e.g: Windows 11, macOS Ventura 13.1 (Intel/Silicon))
     
  5. epernigo

    epernigo

    Joined:
    Sep 24, 2019
    Posts:
    11