[Solved] IAP Cannot build to Android

I have started using Unity IAP in a project and it works fine in the editor but when I attempt to build to Android I get a build error CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. I tried this in my project and it would not build so I updated android studio, checked for updates to unity, deleted and reimported unity IAP and still cannot get it to build. I have also created a new project with no assets in it and attempted to build it after importing Unity IAP and I get the same errors. Has anyone else seen this issue? I don’t see any .jar files because they seem to be packaged in the .aar files so I cannot tell if there are duplicate .jars in the project. Any ideas would be greatly appreciated.

Found a solution. I updated Java from 1.7.0_79 to 1.8.0_101 and it works now. Hope this helps someone with a similar issue.

2 Likes