Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Build fail after importing google play service plugin

Discussion in 'Authentication' started by moonjerim, Oct 17, 2023.

  1. moonjerim

    moonjerim

    Joined:
    Apr 17, 2021
    Posts:
    1
    HI
    I'm trying to use google play game service Login and cloud saves on my android game
    however, I'm experiencing failure of build after importing GooglePlayGames plugin
    does anyone have answer for my errorcode?
    Here's my errorcode:

    C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\0_unity-classes.jar: D8: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\0_unity-classes.jar:classes.dex, C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\4_unity-classes.jar:classes.dex
    com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
    Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\0_unity-classes.jar:classes.dex, C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\4_unity-classes.jar:classes.dex
    Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
    at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:119)
    at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102)
    at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:445)
    at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:348)
    at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:50)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:47)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:65)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:61)
    at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:98)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.execute(NoIsolationWorkerFactory.java:61)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:56)
    at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:215)
    at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:210)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
    at com.android.tools.r8.utils.O.a:)65)
    at com.android.tools.r8.D8.run:)11)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
    ... 34 more
    Caused by: com.android.tools.r8.utils.b: Error: C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\0_unity-classes.jar:classes.dex, Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\0_unity-classes.jar:classes.dex, C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\4_unity-classes.jar:classes.dex
    at com.android.tools.r8.utils.y0.a:)21)
    at com.android.tools.r8.utils.x0.a:)30)
    at com.android.tools.r8.utils.x0.a:)10)
    at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
    at com.android.tools.r8.utils.x0.a:)6)
    at com.android.tools.r8.graph.A0$c.a:)6)
    at com.android.tools.r8.dex.a.a:)85)
    at com.android.tools.r8.dex.a.a:)12)
    at com.android.tools.r8.D8.d:)6)
    at com.android.tools.r8.D8.b:)1)
    at com.android.tools.r8.utils.O.a:)30)
    ... 36 more
    FAILURE: Build failed with an exception.
    * What went wrong:
    Execution failed for task ':launcher:mergeExtDexRelease'.
    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
    Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\0_unity-classes.jar:classes.dex, C:\Users\User\Please\Temp\gradleOut\launcher\build\intermediates\external_file_lib_dex_archives\release\out\4_unity-classes.jar:classes.dex
    Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
    * 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.
    * Get more help at https://help.gradle.org
    BUILD FAILED in 9s
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)