Android build problem: Unity's 5.3 IAP system & Google Admob Plugin

Hello to everyone!

I faced a problem when I tried to build for Android, while using both Unity’s IAP System & Google’s Admob Plugin (I’m using Unity 5.3 and Google Mobile Ads Unity Plugin v2.3.1).

THE PROBLEM: While building for android, Unity stops building and a window pops that notifies that classes could not be converted to dex format. Here is the console:

We faced a similar problem in another one of our games, it was caused by duplicate .jar files and was solved when I deleted on of the duplicate files. Unfortunately, this is not the case here. NOTE: When I disabled GooglePlay.aar (it is imported when you want Unity IAPs) the android build was completed without a problem.

QUESTION: Not having Unity IAPs is not an option for our game. So, is there a way to have both Unity’s IAPs AND Google Mobile Ads, and still build for Android?

Thanx in Advance!

Hi!

I’m facing same issues. I had to disable AdMob stuff from my project for now. Hope this will be resolved quickly.

Build is successful if I delete file in-app-billing-service-aidl.jar under \Assets\Plugins\Android\GoogleMobileAdsPlugin\libs but this obviously is not the way to go since app crashes, for example, when requesting Interstitial ad.

There was also some error regarding IAPTheme not found in android manifest.

-Kalle

just deleting in-app-billing-service-aidl.jar fixed it.

deleting the other plugin file crashes the ads

Try to replace admob 2 with https://github.com/unity-plugins/google-play-game-service-unity-plugin