Build error: "Unable to convert classes into dex format" (IInAppBillingService)

Greetings,

I’ve been banging my head against the wall because of this for a couple of days now… I know zillions of people already posted their issues about this subject, I know it’s related to duplicate jar files, but I can never find the duplicate even when searching the contents of the files in the command line:
“findstr /m /s InAppBilling Assets/*”
I get one file as a result “an_billing.jar”, no duplicates!

If I delete ‘an_billing.jar’ I can build, but game crashes when it connects to store, etc.

We have AdMob, Charboost, GooglePlayGames and StansAssets (which I’m in the process of getting rid of).
I started having the problem when I imported UnityPurchasing.

Here’s the full error:

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.8.0_65\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/TitanCode2/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/android/vending/billing/IInAppBillingService;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/vending/billing/IInAppBillingService$Stub;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/vending/billing/IInAppBillingService$Stub$Proxy;
3 errors; aborting
]
stdout[
processing archive G:\Projects\dq1\unity\Temp\StagingArea\android-libraries\ChartboostSDK\libs\.\chartboost.jar...
ignored resource META-INF/MANIFEST.MF
processing com/chartboost/sdk/CBImpressionActivity.class...
processing com/chartboost/sdk/CBLocation.class...
processing com/chartboost/sdk/Chartboost.class...
processing com/chartboost/sdk/Chartboost$1.class...
processing com/chartboost/sdk/Chartboost$10.class...
processing com/chartboost/sdk/Chartboost$11.class...
processing com/chartboost/sdk/Chartboost$12.class...
processing com/chartboost/sdk/Chartboost$13.class...
processing com/chartboost/sdk/Chartboost$14.class...
processing com/chartboost/sdk/Chartboost$15.class...
processing com/chartboost/sdk/Chartboost$16.class...
processing com/chartboost/sdk/Chartboost$17.class...
processing com/chartboost/sdk/Chartboost$18.class...
processing com/chartboost/sdk/Chartboost$19.class...
processing com/chartboost/sdk/Chartboost$2.class...
processing com/chartboost/sdk/Chartboost$20.class...
processing com/chartboost/sdk/Chartboost$21.class...
processing com/chartboost/sdk/Chartboost$22.class...
processing com/chartboost/sdk/Chartboost$23.class...
processing com/chartboost/sdk/Chartboost$24.class...
processing com/chartboost/sdk/Chartboost$25.class...
processing com/chartboost/sdk/Chartboost$26.class...
processing com/chartboost/sdk/Chartboost$27.class...
processing com/chartboost/sdk/Chartboost$28.class...
processing com/chartboost/sdk/Chartboost$29.class...
processing com/chartboost/sdk/Chartboost$3.class...
processing com/chartboost/sdk/Chartboost$30.class...
processing com/chartboost/sdk/Chartboost$31.class...
processing com/chartboost/sdk/Chartboost$31$1.class...
processing com/chartboost/sdk/Chartboost$32.class...
processing com/chartboost/sdk/Chartboost$33.class...
processing com/chartboost/sdk/Chartboost$34.class...
processing com/chartboost/sdk/Chartboost$35.class...
processing com/chartboost/sdk/Chartboost$4.class...
processing com/chartboost/sdk/Chartboost$5.class...
processing com/chartboost/sdk/Chartboost$6.class...
processing com/chartboost/sdk/Chartboost$7.class...
processing com/chartboost/sdk/Chartboost$8.class...
processing com/chartboost/sdk/Chartboost$9.class...
processing com/chartboost/sdk/Chartboost$CBFramework.class...
processing com/chartboost/sdk/Chartboost$a.class...
processing com/chartboost/sdk/ChartboostActivity.class...
processing com/chartboost/sdk/ChartboostDelegate.class...
processing com/chartboost/sdk/InPlay/CBInPlay.class...
processing com/chartboost/sdk/InPlay/a.class...
processing com/chartboost/sdk/InPlay/a$1.class...
processing com/chartboost/sdk/InPlay/a$2.class...
processing com/chartboost/sdk/InPlay/a$a.class...
processing com/chartboost/sdk/InPlay/a$b.class...
processing com/chartboost/sdk/Libraries/CBLogging.class...
processing com/chartboost/sdk/Libraries/CBLogging$Level.class...
processing com/chartboost/sdk/Libraries/CBUtility.class...
processing com/chartboost/sdk/Libraries/a.class...
processing com/chartboost/sdk/Libraries/a$1.class...
processing com/chartboost/sdk/Libraries/b.class...
processing com/chartboost/sdk/Libraries/c.class...
processing com/chartboost/sdk/Libraries/c$1.class...
processing com/chartboost/sdk/Libraries/c$a.class...
processing com/chartboost/sdk/Libraries/d.class...
processing com/chartboost/sdk/Libraries/e.class...
processing com/chartboost/sdk/Libraries/e$1.class...
processing com/chartboost/sdk/Libraries/e$a.class...
processing com/chartboost/sdk/Libraries/e$b.class...
processing com/chartboost/sdk/Libraries/f.class...
processing com/chartboost/sdk/Libraries/f$1.class...
processing com/chartboost/sdk/Libraries/g.class...
processing com/chartboost/sdk/Libraries/g$1.class...
processing com/chartboost/sdk/Libraries/g$a.class...
processing com/chartboost/sdk/Libraries/g$b.class...
processing com/chartboost/sdk/Libraries/g$c.class...
processing com/chartboost/sdk/Libraries/g$d.class...
processing com/chartboost/sdk/Libraries/g$e.class...
processing com/chartboost/sdk/Libraries/g$f.class...
processing com/chartboost/sdk/Libraries/g$g.class...
processing com/chartboost/sdk/Libraries/g$h.class...
processing com/chartboost/sdk/Libraries/g$i.class...
processing com/chartboost/sdk/Libraries/g$j.class...
processing com/chartboost/sdk/Libraries/g$k.class...
processing com/chartboost/sdk/Libraries/g$l.class...
processing com/chartboost/sdk/Libraries/g$m.class...
processing com/chartboost/sdk/Libraries/g$n.class...
processing com/chartboost/sdk/Libraries/g$o.class...
processing com/chartboost/sdk/Libraries/g$p.class...
processing com/chartboost/sdk/Libraries/h.class...
processing com/chartboost/sdk/Libraries/i.class...
processing com/chartboost/sdk/Libraries/j.class...
processing com/chartboost/sdk/Libraries/j$1.class...
processing com/chartboost/sdk/Libraries/j$2.class...
processing com/chartboost/sdk/Libraries/j$a.class...
processing com/chartboost/sdk/Libraries/k.class...
processing com/chartboost/sdk/Model/CBError.class...
processing com/chartboost/sdk/Model/CBError$1.class...
processing com/chartboost/sdk/Model/CBError$CBClickError.class...
processing com/chartboost/sdk/Model/CBError$CBImpressionError.class...
processing com/chartboost/sdk/Model/CBError$a.class...
processing com/chartboost/sdk/Model/a.class...
processing com/chartboost/sdk/Model/a$1.class...
processing com/chartboost/sdk/Model/a$a.class...
processing com/chartboost/sdk/Model/a$b.class...
processing com/chartboost/sdk/Model/a$c.class...
processing com/chartboost/sdk/Model/a$d.class...
processing com/chartboost/sdk/Model/b.class...
processing com/chartboost/sdk/Tracking/CBAnalytics.class...
processing com/chartboost/sdk/Tracking/CBAnalytics$1.class...
processing com/chartboost/sdk/Tracking/CBAnalytics$CBIAPPurchaseInfo.class...
processing com/chartboost/sdk/Tracking/CBAnalytics$CBIAPType.class...
processing com/chartboost/sdk/Tracking/CBAnalytics$CBLevelType.class...
processing com/chartboost/sdk/Tracking/a.class...
processing com/chartboost/sdk/a.class...
processing com/chartboost/sdk/b.class...
processing com/chartboost/sdk/b$1.class...
processing com/chartboost/sdk/b$a.class...
processing com/chartboost/sdk/c.class...
processing com/chartboost/sdk/c$1.class...
processing com/chartboost/sdk/c$1$1.class...
processing com/chartboost/sdk/c$2.class...
processing com/chartboost/sdk/c$3.class...
processing com/chartboost/sdk/c$4.class...
processing com/chartboost/sdk/c$a.class...
processing com/chartboost/sdk/c$b.class...
processing com/chartboost/sdk/d.class...
processing com/chartboost/sdk/d$1.class...
processing com/chartboost/sdk/d$2.class...
processing com/chartboost/sdk/d$3.class...
processing com/chartboost/sdk/d$a.class...
processing com/chartboost/sdk/e.class...
processing com/chartboost/sdk/e$1.class...
processing com/chartboost/sdk/e$2.class...
processing com/chartboost/sdk/e$2$1.class...
processing com/chartboost/sdk/e$2$1$1.class...
processing com/chartboost/sdk/e$3.class...
processing com/chartboost/sdk/f.class...
processing com/chartboost/sdk/f$1.class...
processing com/chartboost/sdk/f$a.class...
processing com/chartboost/sdk/f$a$1.class...
processing com/chartboost/sdk/f$b.class...
processing com/chartboost/sdk/impl/a.class...
processing com/chartboost/sdk/impl/aa.class...
processing com/chartboost/sdk/impl/aa$a.class...
processing com/chartboost/sdk/impl/ab.class...
processing com/chartboost/sdk/impl/ac.class...
processing com/chartboost/sdk/impl/ad.class...
processing com/chartboost/sdk/impl/ae.class...
processing com/chartboost/sdk/impl/ae$1.class...
processing com/chartboost/sdk/impl/af.class...
processing com/chartboost/sdk/impl/af$1.class...
processing com/chartboost/sdk/impl/af$1$1.class...
processing com/chartboost/sdk/impl/af$2.class...
processing com/chartboost/sdk/impl/af$2$1.class...
processing com/chartboost/sdk/impl/af$3.class...
processing com/chartboost/sdk/impl/ag.class...
processing com/chartboost/sdk/impl/ag$1.class...
processing com/chartboost/sdk/impl/ah.class...
processing com/chartboost/sdk/impl/ah$a.class...
processing com/chartboost/sdk/impl/ah$a$1.class...
processing com/chartboost/sdk/impl/ah$a$2.class...
processing com/chartboost/sdk/impl/ai.class...
processing com/chartboost/sdk/impl/ai$1.class...
processing com/chartboost/sdk/impl/ai$2.class...
processing com/chartboost/sdk/impl/ai$a.class...
processing com/chartboost/sdk/impl/ai$a$1.class...
processing com/chartboost/sdk/impl/ai$a$2.class...
processing com/chartboost/sdk/impl/ai$a$3.class...
processing com/chartboost/sdk/impl/ai$a$4.class...
processing com/chartboost/sdk/impl/ai$a$5.class...
processing com/chartboost/sdk/impl/ai$b.class...
processing com/chartboost/sdk/impl/aj.class...
processing com/chartboost/sdk/impl/ak.class...
processing com/chartboost/sdk/impl/al.class...
processing com/chartboost/sdk/impl/al$1.class...
processing com/chartboost/sdk/impl/am.class...
processing com/chartboost/sdk/impl/am$1.class...
processing com/chartboost/sdk/impl/am$2.class...
processing com/chartboost/sdk/impl/am$a.class...
processing com/chartboost/sdk/impl/an.class...
processing com/chartboost/sdk/impl/ao.class...
processing com/chartboost/sdk/impl/ao$1.class...
processing com/chartboost/sdk/impl/ao$2.class...
processing com/chartboost/sdk/impl/ao$3.class...
processing com/chartboost/sdk/impl/ao$4.class...
processing com/chartboost/sdk/impl/ao$5.class...
processing com/chartboost/sdk/impl/ap.class...
processing com/chartboost/sdk/impl/aq.class...
processing com/chartboost/sdk/impl/ar.class...
processing com/chartboost/sdk/impl/ar$1.class...
processing com/chartboost/sdk/impl/as.class...
processing com/chartboost/sdk/impl/as$1.class...
processing com/chartboost/sdk/impl/as$2.class...
processing com/chartboost/sdk/impl/at.class...
processing com/chartboost/sdk/impl/at$1.class...
processing com/chartboost/sdk/impl/au.class...
processing com/chartboost/sdk/impl/av.class...
processing com/chartboost/sdk/impl/av$1.class...
processing com/chartboost/sdk/impl/aw.class...
processing com/chartboost/sdk/impl/aw$1.class...
processing com/chartboost/sdk/impl/aw$a.class...
processing com/chartboost/sdk/impl/aw$a$1.class...
processing com/chartboost/sdk/impl/aw$a$a.class...
processing com/chartboost/sdk/impl/aw$a$a$1.class...
processing com/chartboost/sdk/impl/aw$b.class...
processing com/chartboost/sdk/impl/ax.class...
processing com/chartboost/sdk/impl/ax$1.class...
processing com/chartboost/sdk/impl/ax$2.class...
processing com/chartboost/sdk/impl/ay.class...
processing com/chartboost/sdk/impl/ay$a.class...
processing com/chartboost/sdk/impl/ay$b.class...
processing com/chartboost/sdk/impl/az.class...
processing com/chartboost/sdk/impl/az$a.class...
processing com/chartboost/sdk/impl/az$b.class...
processing com/chartboost/sdk/impl/az$c.class...
processing com/chartboost/sdk/impl/az$d.class...
processing com/chartboost/sdk/impl/b.class...
processing com/chartboost/sdk/impl/b$a.class...
processing com/chartboost/sdk/impl/ba.class...
processing com/chartboost/sdk/impl/ba$1.class...
processing com/chartboost/sdk/impl/ba$a.class...
processing com/chartboost/sdk/impl/ba$b.class...
processing com/chartboost/sdk/impl/ba$c.class...
processing com/chartboost/sdk/impl/ba$d.class...
processing com/chartboost/sdk/impl/ba$e.class...
processing com/chartboost/sdk/impl/ba$e$a.class...
processing com/chartboost/sdk/impl/bb.class...
processing com/chartboost/sdk/impl/bb$1.class...
processing com/chartboost/sdk/impl/bb$1$1.class...
processing com/chartboost/sdk/impl/bb$a.class...
processing com/chartboost/sdk/impl/bc.class...
processing com/chartboost/sdk/impl/bc$a.class...
processing com/chartboost/sdk/impl/bc$a$1.class...
processing com/chartboost/sdk/impl/bc$b.class...
processing com/chartboost/sdk/impl/bc$c.class...
processing com/chartboost/sdk/impl/bd.class...
processing com/chartboost/sdk/impl/bd$1.class...
processing com/chartboost/sdk/impl/bd$2.class...
processing com/chartboost/sdk/impl/bd$a.class...
processing com/chartboost/sdk/impl/bd$b.class...
processing com/chartboost/sdk/impl/bd$c.class...
processing com/chartboost/sdk/impl/be.class...
processing com/chartboost/sdk/impl/be$1.class...
processing com/chartboost/sdk/impl/be$2.class...
processing com/chartboost/sdk/impl/be$3.class...
processing com/chartboost/sdk/impl/be$4.class...
processing com/chartboost/sdk/impl/be$5.class...
processing com/chartboost/sdk/impl/be$6.class...
processing com/chartboost/sdk/impl/bf.class...
processing com/chartboost/sdk/impl/bf$1.class...
processing com/chartboost/sdk/impl/bf$2.class...
processing com/chartboost/sdk/impl/bf$3.class...
processing com/chartboost/sdk/impl/bf$4.class...
processing com/chartboost/sdk/impl/bf$5.class...
processing com/chartboost/sdk/impl/bg.class...
processing com/chartboost/sdk/impl/bg$a.class...
processing com/chartboost/sdk/impl/bh.class...
processing com/chartboost/sdk/impl/bh$1.class...
processing com/chartboost/sdk/impl/bh$2.class...
processing com/chartboost/sdk/impl/bh$3.class...
processing com/chartboost/sdk/impl/bh$a.class...
processing com/chartboost/sdk/impl/bh$b.class...
processing com/chartboost/sdk/impl/bi.class...
processing com/chartboost/sdk/impl/bj.class...
processing com/chartboost/sdk/impl/bk.class...
processing com/chartboost/sdk/impl/bk$1.class...
processing com/chartboost/sdk/impl/bk$2.class...
processing com/chartboost/sdk/impl/bk$a.class...
processing com/chartboost/sdk/impl/bl.class...
processing com/chartboost/sdk/impl/bl$1.class...
processing com/chartboost/sdk/impl/bl$1$1.class...
processing com/chartboost/sdk/impl/bl$2.class...
processing com/chartboost/sdk/impl/bl$a.class...
processing com/chartboost/sdk/impl/bl$b.class...
processing com/chartboost/sdk/impl/bm.class...
processing com/chartboost/sdk/impl/bn.class...
processing com/chartboost/sdk/impl/bo.class...
processing com/chartboost/sdk/impl/bp.class...
processing com/chartboost/sdk/impl/bq.class...
processing com/chartboost/sdk/impl/bq$1.class...
processing com/chartboost/sdk/impl/br.class...
processing com/chartboost/sdk/impl/br$1.class...
processing com/chartboost/sdk/impl/br$a.class...
processing com/chartboost/sdk/impl/br$b.class...
processing com/chartboost/sdk/impl/br$c.class...
processing com/chartboost/sdk/impl/bs.class...
processing com/chartboost/sdk/impl/bt.class...
processing com/chartboost/sdk/impl/bu.class...
processing com/chartboost/sdk/impl/bv.class...
processing com/chartboost/sdk/impl/bw.class...
processing com/chartboost/sdk/impl/bx.class...
processing com/chartboost/sdk/impl/by.class...
processing com/chartboost/sdk/impl/bz.class...
processing com/chartboost/sdk/impl/bz$1.class...
processing com/chartboost/sdk/impl/bz$a.class...
processing com/chartboost/sdk/impl/bz$b.class...
processing com/chartboost/sdk/impl/bz$c.class...
processing com/chartboost/sdk/impl/bz$d.class...
processing com/chartboost/sdk/impl/bz$e.class...
processing com/chartboost/sdk/impl/bz$f.class...
processing com/chartboost/sdk/impl/bz$g.class...
processing com/chartboost/sdk/impl/bz$h.class...
processing com/chartboost/sdk/impl/bz$i.class...
processing com/chartboost/sdk/impl/bz$j.class...
processing com/chartboost/sdk/impl/bz$k.class...
processing com/chartboost/sdk/impl/bz$l.class...
processing com/chartboost/sdk/impl/bz$m.class...
processing com/chartboost/sdk/impl/bz$n.class...
processing com/chartboost/sdk/impl/bz$o.class...
processing com/chartboost/sdk/impl/bz$p.class...
processing com/chartboost/sdk/impl/bz$q.class...
processing com/chartboost/sdk/impl/bz$r.class...
processing com/char<message truncated>

Any idea what’s causing that or where the duplicate jar/class is?

Thanks.

OK so I created a new project and imported UnityPurchasing along with that bogus an_billing.jar, got the error, then started deleting files incrementally from UnityPurchasing till the error got away and I was able to build.

And it seems that the file that’s causing the problem is “UnityPurchasing/Bin/Android/GooglePlay.aar”

Decompressing that with 7Zip I got a bunch of empty folders and a ‘classes.jar’ file, decompressing that I now see the “IInAppBillingService” files… I’m not sure if I should be deleting those or the “an_billing.jar”, I assume the latter.

Hi Vexe,
I have a similar problem.
Everything is working fine building for iOs, unfortunately it still doesn’t work for Android.
I’m using UnityPurchasing , Facebook and VoxelBusters - Cross platform Native plugin.
I also tried to disable UnityPurchasing and VoxelBusters but the error persist.
Please let me know if you got it work.

@weliketoparty yeah dude, it’s a total nightmare. Totally absurd. Super lazy bullshit developers, they never thought of programmer usability it seems! So they give you an error that there’s a duplicate, well how about you tell me where the duplicates are coming from, Mr.Genius Coder ™??

There’s a couple of techniques you could try, first if you’re on Windows use findstr (findstr /m /s duplicate_function_name Assets/*) and see if that yields duplicate .jar files.

If not, that probably means you have a similar situation to mine, you have to find out at which point you started getting the error (in my case, it was after I imported UnityPurchasing) - Once you find that out, look into what files they added, there’s probably a .aar file somewhere that’s double compressed so if you decompress it it will yield another .jar file which if you decompress you’ll get to your duplicate files.

The way I found the file is by creating an empty project and first importing UnityPurchases, then an_billing.jar, I got the error, then started digging into UnityPurchasing Android/Lib files, I found two files: common.aar and GooglePlay.aar, I took out the first one and I still got the error, took out the second and the error went away, do I decompressed the second file and found the problematic jar which was just called classes.jar, which contained the IInAppBillingServices duplicate class.

I would suspect in your case it’s something between UnityPurchasing and Cross Platform Native Plugin (which I’ve never tried, that thing is huge from what it seems 31MB of assets…) - If you disabled UP and VB and the error persisted, try disabling Facebook and/or CPNP and see what happens, just keep doing that until you get to the culprit.

Hope that helps!

Hey Man,
After a 5 hours troubleshooting session I’m now able to extract the APK.
Yes as we both now it is a file/class duplication that break the building process.
What I did on Mac is:

  • Delate UnityPurchasing folder inside Assets>Plugins
  • Quit Unity, open up again, reimport UnityPurchasing form the Service Tab.
  • Reveal the asset folder on Finder. Search .jar on the tab.
  • After that I saw 2 files called : android-support-v4.jar . I delate one and then I was able to build.

That’s probably a Facebook and Cross Platform Native Plugin problem actually .

You are right, it’s a big shame that the callback on console (Which they say to look) , doesn’t show the path, or at least the file name that causes this problems.

I still get some strange alert errors at the end of the build.
I can easily say that Plugin is the worst part of Unity, they make everything unstable.

The Android build process takes all your code (including libraries) and processes them together. I think that at that point, it has no knowledge of which classes came from which library…

Were you able to resolve this issue? look for all the .jar or .aar files in your project, see if there are any duplicates. Also, some .jars (or .aar’s) will include other libraries into them, making it harder to solve a case of duplicate classes.

1 Like

@liortal Yes, after removing one of the .aar, the issue didn’t occur. One of the .aar is the one that’s created by the Unity itself while importing one deleted project directory.

@vexe As you figured, the conflict with Unity IAP is caused by another of your plugins having IAP functionality. Google’s IAP API requires the definition of a type in the ‘com/android/vending/billing’ namespace.

I will move those types to a separate AAR in Unity IAP, which can then easily be deleted if you happen to bring in plugins that also define those types. I’ll add this to the docs too. I’m sorry for the trouble this has caused you.

I have same problem but i couldn’t fix this what can i do?

i have this problem

stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzig;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzgt;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzgk;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzdl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzcv;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzhf;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzjd;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzfz;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzfn;

Your project includes the same library twice somehow. Take a look at what .jar or .aar libraries you include in your project. Most likely that you have the same one more than once.

i reinstalled GPGS but now i have a new problem. When i build the game it gives

Assets/GooglePlayGames/Editor/BackgroundResolution.cs(33,24): error CS0433: The imported type `Google.JarResolver.PlayServicesSupport’ is defined multiple times

Assets/GooglePlayGames/Editor/BackgroundResolution.cs(121,49): error CS0433: The imported type `Google.JarResolver.Dependency’ is defined multiple times

Again, you are including some file/class twice. Try to see where you have BackgroundResolution twice in your project.

i have one backgroundresolution file.

Then u have another one compiled into a dll somewhere maybe ?

but where? i dont know.

Take a look at your project. Look for plugins (.dll files) and see if you have the same one twice.

i have 2 JarResolverLib.dll file but each file in different folder. one is in PlayServicesResolver\Editor. The other is in GooglePlayGames\Editor

This might be a coincidence but doing “Window->Unity IAP->Android->Target Google Play” solved my “Unable to convert classes into dex format” problem with Unity IAP.

I was creating billing.jar file to purchase and had also a unityPurchasing plugin, that had billing file too.
I removed the Unity purchasing file and hence problem solved.:slight_smile:

Ok. I have ran into the same thing, but my plugins were Google Play Services, Chartboost and then Facebook 7.9.
I imported facebook last and then got the 'Unable to convert classes into dex format error.
The problem was the same type of file but with different versioning.
They were:
support-v4-23.4.0.aar (Facebook SDK)
support-annotations-23.4.0.aar (Facebook SDK)

and

support-v4-24.aar (Chartboost SDK)
support-annotations-24.aar (Chartboost SDK)

When I got rid of the older version of the file it build just fine.

1 Like