playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.43k stars 952 forks source link

Execution failed for task ':launcher:checkReleaseDuplicateClasses' 0.11.1 version #3131

Open wwidelec1 opened 2 years ago

wwidelec1 commented 2 years ago

This form is for reporting Unity Plugin issues only. To report an issue with the Play Games Service (non-SDK related), check Google Play Games Services Support. Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

Describe the bug After upgrading google play games to 0.11.1 version I got this error on build:

`Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build failed with an exception.

To Reproduce Steps to reproduce the behavior:

  1. I deleted all files related to old version
  2. Updated to the newest using .unitypackage
  3. Build, and got an error
  4. I'm also using a lot of other plugins listed in "Versions" below

Expected behavior Building works.

Observed behavior Duplicate class error.

Versions

ozdemir08 commented 2 years ago

v11 is using a new java sdk called play-services-games-v2 and v10 is using play-services-games. The collision seems to be happening due to your project having both aar files. If you could go to Plugins > Android and remove play-services-games.aar (or the whole directory and resolve dependencies again), this problem should be solved.

Thanks for reporting this issue. I will also add an instruction to Upgrading.txt about this.

wwidelec1 commented 2 years ago

@ozdemir08 resolving and fore resolving dependencies don't help. I think another plugin I mentioned adds play-services-games.aar. I'll try to delete this manualy, disable auto-resolve and let you know if this works

wwidelec1 commented 2 years ago

@ozdemir08 now i got another duplicates like this:

Duplicate class com.google.android.gms.internal.nearby.zzac found in modules jetified-com.google.android.gms.play-services-nearby-18.0.0-runtime.jar (:com.google.android.gms.play-services-nearby-18.0.0:) and jetified-com.google.android.gms.play-services-nearby-18.0.2-runtime.jar (:com.google.android.gms.play-services-nearby-18.0.2:)

wwidelec1 commented 2 years ago

Ok. I deleted by hand other duplicates and building works now. I hope other plugins are fine too. Why the dependencies are duplicated in this case? Is there any better way to do that than deleting it by hand?