I am trying to integrate Mobile Social Plugin (Unity Asset Store - The Best Assets for Game Making) into my Android game. I already have several other plugins including Admob Ads and Google Play Games services and Unity IAP.
I did have some problems getting it to work and the support team helped me in this thread:
http://forum.unity3d.com/threads/released-mobile-social-plugin.229961/page-7#post-2601452
They emailed me a google-play-services.jar file to put in my project, which I did.
Now when I try to build I get this error:
Build failure
Unable to convert classes into dex format. See the Console for details.
The console spits out this (edited & updated 14th July):
CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:/Program Files/Java/jdk1.8.0_92\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/Matt/AppData/Local/Android/sdk ools" -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/ads/AdRequest;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/AdRequest$ErrorCode;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/AdRequest$Gender;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/AdSize;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/mediation/AbstractAdViewAdapter;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/mediation/AbstractAdViewAdapter$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/mediation/AbstractAdViewAdapter$zza;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/mediation/AbstractAdViewAdapter$zzb;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/mediation/AbstractAdViewAdapter$zzc;
I’ve emailed the support team again but just wanted to open this up to you kind folks to see if I can speed this up. I’m tantalisingly close to hitting beta just as soon as I can get this working!
I’ve done some digging around and from what I can see this is caused by conflicts with some JAR files in my project. Some people have said they delete a support jar and it works, while others are deleting duplicate classes within the jar.
This is the full list of all .jar files in my entire project:
How can I find out where the problem lies and what steps to take to solve it?