I used google-signin-unity plugin on my game.
But this issue happened when I built android apk on unity.
unity version is 2022.3.16f1.
What went wrong:
Execution failed for task ':launcher:mergeDexRelease'.
A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
There was a failure while executing work items
A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Type com.google.googlesignin.GoogleSignInFragment$State is defined multiple times:
>D:projectLibraryBeeAndroidPrjIL2CPPGradleunityLibrarybuild.transformsb912aa27fde5edc070cb71db7c70b335transformedclassesclasses.dex,
>D:projectLibraryBeeAndroidPrjIL2CPPGradlelauncherbuildintermediatesexternal_libs_dexreleasemergeExtDexReleaseclasses.dex
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
It seems like files in folder below are defined multiple times in another place?
native-googlesigninsrcmainjavacomgooglegooglesignin
I have searched for fixing long time but it still no solution.
(gradle and AndroidManifest file setting etc)
Does anyone have any idea?
andy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.