When I import the unity IAP plugin from the services window I get the error in the title. When I delete that folder I can build just fine. Not sure what the issue is, if someone could guide me to a solution would be greatly appreciated.
I also looked for duplicate .jar files and didn’t find any duplicates.
Edit2: Deleting the android folder with GooglePlay.AAR allows me to build, but without it I cant make purchases. Mind you it has no duplicates.
Edit 3 just updating the error:
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.7.0_25\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“D:/Program Files (x86)/Android/android-sdk\tools” -Dfile.encoding=UTF8 -jar “D:\Program Files (x86)\Unity531\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -
Sorry for the late reply, I get this error when integrating this plugin with ADMOB/FB plugins, if I delete any of the game services files/ admob then I can build, but then Im either stuck with no ADs or the game simply won’t launch because I deleted google-play-services.
The exact error:
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.7.0_25\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“D:/Program Files (x86)/Android/android-sdk\tools” -Dfile.encoding=UTF8 -jar “D:\Program Files (x86)\Unity531\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -
@hodispk@Venros AdMob may include a second copy of ‘in-app-billing-service-aidl.jar’ (to support purchasing from an Advert) - advice would be then to remove one copy of that file and see if the build error is fixed.
Hi @nicholasr , I couldn’t find the jar files named “in-app-billing-service-aidl.jar”. I am still getting the same error log saying:
CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
/Library/Java/JavaVirtualMachines/jdk1.7.0_76.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“/Users/admin/Downloads/android-sdk-macosx/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar”
Currently, I am using Unity 5.3.2p and Google AdMob Unity Plugin v3.0.1 (newest). Appreciate any help!
Details of Java Class duplication during Android Build are reported in the Editor Console. The Console contains an often lengthy sprawl of build details in which you may find the explicit class name which is causing this conflict for DEX.
If you find a suspect class name, causing trouble, please share it here and I’ll guess as to which file in your project has duplicate classes with Unity IAP. If however the log does not reveal its secrets so easily then please share your Editor.log from a failed build (DM me if you prefer) and we can move forward from there.
@vexe - From your thread (388955) it seems like your issue may be solved; the “Android Native” plugin includes Google’s IAB classes.
If not, and you’re using AdMob, then look for “in-app-billing-service-aidl.jar” - avoid searching for the plural one in-app-billing-services-aidl.jar.
The latest store package, 1.3.1, splits out Unity IAP’s Google Play AIDL types into a separate Android archive, GoogleAIDL.aar, which can be deleted if other plugins define those same AIDL types.
For anyone so affected, update to 1.3.1 from the IAP cloud service window in the Editor.
You will also get this error if you still have the Unity Ads related files in your Plugins folder. They are included with the Unity editor [5.3.4], so having the duplicate files in Plugins causes this error to occur.