I’m trying to build on Android, and after adding the Google Play Games Services plugin, I’m getting this error:
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. C:\Program Files\Java\jdk1.7.0_79\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“C:/Users/applesauce/AppData/Local/Android/sdk\tools” -Dfile.encoding=UTF8 -jar “C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -
stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient$Info;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthUtil;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GooglePlayServicesAvailabilityException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableAuthException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableNotifiedException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/AccountPicker;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/ConnectionResult;
The common answer seems to be “delete the duplicate .jar files”. The problem is, I have no duplicate .jar files. I’ve checked, and they’re all unique.
Furthermore, I’ve used JD-GUI to verify that the things above that were supposedly already added (e.g. AdvertisingIdClient, GoogleAuthUtil, etc.) only appear in one .jar file each. So if they are being added multiple times, I can only find the source of one such addition.
What might cause this issue, and how might I resolve it?
Thank you.