Can't build Android apk

Hey guys.

I’m having huge problems since I try to use admob.

First some imported script went with an error in it (solved here : No overload for method `DoResolution` takes `3` arguments · Issue #272 · googleads/googleads-mobile-unity · GitHub ). Pretty amazing start.

Then AndroidManifest had some troubles with android:minSdkVersion, android:targetSdkVersion and com.google.android.gms.version which I believe I have fixed

And now it’s this:

CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_101\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“C:/Program Files (x86)/Android/android-sdk ools” -Dfile.encoding=UTF8 -jar “D:\Unity54\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$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;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/ads/mediation/AbstractAdViewAdapter$zzd;

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at SDKMain.main(SDKMain.java:129)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)
… 9 more
]
stdout[
processing archive D:\KnightTraining\KnightTraining\Temp\StagingArea\android-libraries\AmazonAppStore\libs.\classes.jar…
processing com/unity/purchasing/amazon/AmazonPurchasing.class…
processing com/unity/purchasing/amazon/AmazonPurchasing$1.class…
processing com/unity/purchasing/amazon/AmazonPurchasing$2.class…
processing com/unity/purchasing/amazon/AmazonPurchasing$3.class…
processing com/unity/purchasing/amazon/AmazonPurchasing$4.class…
processing com/unity/purchasing/amazon/AmazonPurchasing$LocaleNotFoundException.class…
processing com/unity/purchasing/amazon/AmazonPurchasingService.class…
processing com/unity/purchasing/amazon/BuildConfig.class…
processing com/unity/purchasing/amazon/CurrencyMapper.class…
processing com/unity/purchasing/amazon/IPurchasingService.class…
processing archive D:\KnightTraining\KnightTraining\Temp\StagingArea\android-libraries\AmazonAppStore\libs.\in-app-purchasing-2.0.61.jar…
processing com/amazon/device/iap/package-info.class…
processing com/amazon/device/iap/PurchasingListener.class…
processing com/amazon/device/iap/PurchasingService.class…
processing com/amazon/device/iap/ResponseReceiver.class…
processing com/amazon/device/iap/internal/a.class…
processing com/amazon/device/iap/internal/a/a.class…
processing com/amazon/device/iap/internal/a/b.class…
processing com/amazon/device/iap/internal/a/c.class…
processing com/amazon/device/iap/internal/a/c$1.class…
processing com/amazon/device/iap/internal/a/d.class…
processing com/amazon/device/iap/internal/b.class…
processing com/amazon/device/iap/internal/b/a.class…
processing com/amazon/device/iap/internal/b/a/a.class…
processing com/amazon/device/iap/internal/b/a/b.class…
processing com/amazon/device/iap/internal/b/a/c.class…
processing com/amazon/device/iap/internal/b/a/d.class…
processing com/amazon/device/iap/internal/b/b.class…
processing com/amazon/device/iap/internal/b/b/a.class…
processing com/amazon/device/iap/internal/b/b/a$1.class…
processing com/amazon/device/iap/internal/b/b/b.class…
processing com/amazon/device/iap/internal/b/b/c.class…
processing com/amazon/device/iap/internal/b/b/d.class…
processing com/amazon/device/iap/internal/b/c.class…
processing com/amazon/device/iap/internal/b/c/a.class…
processing com/amazon/device/iap/internal/b/c/b.class…
processing com/amazon/device/iap/internal/b/c/c.class…
processing com/amazon/device/iap/internal/b/c/d.class…
processing com/amazon/device/iap/internal/b/d.class…
processing com/amazon/device/iap/internal/b/d/a.class…
processing com/amazon/device/iap/internal/b/d/b.class…
processing com/amazon/device/iap/internal/b/d/c.class…
processing com/amazon/device/iap/internal/b/d/d.class…
processing com/amazon/device/iap/internal/b/e.class…
processing com/amazon/device/iap/internal/b/e/a.class…
processing com/amazon/device/iap/internal/b/e/b.class…
processing com/amazon/device/iap/internal/b/e/c.class…
processing com/amazon/device/iap/internal/b/e/d.class…
processing com/amazon/device/iap/internal/b/e$1.class…
processing com/amazon/device/iap/internal/b/f.class…
processing com/amazon/device/iap/internal/b/f/a.class…
processing com/amazon/device/iap/internal/b/f/b.class…
processing com/amazon/device/iap/internal/b/f/c.class…
processing com/amazon/device/iap/internal/b/g.class…
processing com/amazon/device/iap/internal/b/g/a.class…
processing com/amazon/device/iap/internal/b/g/b.class…
processing com/amazon/device/iap/internal/b/h.class…
processing com/amazon/device/iap/internal/b/h/a.class…
processing com/amazon/device/iap/internal/b/i.class…
processing com/amazon/device/iap/internal/c.class…
processing com/amazon/device/iap/internal/c/a.class…
processing com/amazon/device/iap/internal/c/a$1.class…
processing com/amazon/device/iap/internal/c/b.class…
processing com/amazon/device/iap/internal/c/c.class…
processing com/amazon/device/iap/internal/c/d.class…
processing com/amazon/device/iap/internal/c/e.class…
processing com/amazon/device/iap/internal/d.class…
processing com/amazon/device/iap/internal/e.class…
processing com/amazon/device/iap/internal/model/ProductBuilder.class…
processing com/amazon/device/iap/internal/model/ProductDataResponseBuilder.class…
processing com/amazon/device/iap/internal/model/PurchaseResponseBuilder.class…
processing com/amazon/device/iap/internal/model/PurchaseUpdatesResponseBuilder.class…
processing com/amazon/device/iap/internal/model/ReceiptBuilder.class…
processing com/amazon/device/iap/internal/model/UserDataBuilder.class…
processing com/amazon/device/iap/internal/model/UserDataResponseBuilder.class…
processing com/amazon/device/iap/internal/model/a.class…
processing com/amazon/device/iap/internal/util/MetricsHelper.class…
processing com/amazon/device/iap/internal/util/a.class…
processing com/amazon/device/iap/internal/util/a$1.class…
processing com/amazon/device/iap/internal/util/b.class…
processing com/amazon/device/iap/internal/util/c.class…
processing com/amazon/device/iap/internal/util/d.class…
processing com/amazon/device/iap/internal/util/e.class…
processing com/amazon/device/iap/model/package-info.class…
processing com/amazon/device/iap/model/FulfillmentResult.class…
processing com/amazon/device/iap/model/Product.class…
processing com/amazon/device/iap/model/Product$1.class…
processing com/amazon/device/iap/model/ProductDataResponse.class…
processing com/amazon/device/iap/model/ProductDataResponse$RequestStatus.class…
processing com/amazon/device/iap/model/ProductType.class…
processing com/amazon/device/iap/model/PurchaseResponse.class…
processing com/amazon/device/iap/model/PurchaseResponse$RequestStatus.class…
processing com/amazon/device/iap/model/PurchaseUpdatesResponse.class…
processing com/amazon/device/iap/model/PurchaseUpdatesResponse$RequestStatus.class…
processing com/amazon/device/iap/model/Receipt.class…
processing com/amazon/device/iap/model/RequestId.class…
processing com/amazon/device/iap/model/RequestId$1.class…
processing com/amazon/device/iap/model/UserData.class…
processing com/amazon/device/iap/model/UserData$1.class…
processing com/amazon/device/iap/model/UserDataResponse.class…
processing com/amazon/device/iap/model/UserDataResponse$RequestStatus.class…
processing archive D:\KnightTraining\KnightTraining\Temp\StagingArea\android-libraries\GoogleAIDL\libs.\classes.jar…
processing com/android/vending/billing/BuildConfig.class…
processing com/android/vending/billing/IInAppBillingService.class…
processing com/android/vending/billing/IInAppBillingService$Stub.class…
processing com/android/vending/billing/IInAppBillingService$Stub$Proxy.class…
processing archive D:\KnightTraining\KnightTraining\Temp\StagingArea\android-libraries\GoogleMobileAdsPlugin\libs.\unity-plugin-library.jar…
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource com/
ignored resource com/google/
ignored resource com/google/unity/
processing com/google/unity/BuildConfig.class…
ignored resource com/google/unity/ads/
processing com/google/unity/ads/Banner.class…
processing com/google/unity/ads/Banner$1.class…
processing com/google/unity/ads/Banner$1$1.class…
processing com/google/unity/ads/Banner$2.class…
processing com/google/unity/ads/Banner$3.class…
processing com/google/unity/ads/Banner$4.class…
processing com/google/unity/ads/Banner$5.class…
processing com/google/unity/ads/CustomNativeAd.class…
processing com/google/unity/ads/CustomNativeAd$1.class…
processing com/google/unity/ads/CustomNativeAd$2.class…
processing com/google/unity/ads/Interstitial.class…
processing com/google/unity/ads/Interstitial$1.class…
processing com/google/unity/ads/Interstitial$1$1.class…
processing com/google/unity/ads/Interstitial$2.class…
processing com/google/unity/ads/Interstitial$3.class…
processing com/google/unity/ads/Interstitial$4.class…
processing com/google/unity/ads/Interstitial$5.class…
processing com/google/unity/ads/NativeAdLoader.class…
processing com/google/unity/ads/NativeAdLoader$1.class…
processing com/google/unity/ads/NativeAdLoader$2.class…
processing com/google/unity/ads/NativeAdLoader$3.class…
processing com/google/unity/ads/NativeAdLoader$3$1.class…
processing com/google/unity/ads/NativeAdLoader$3$2.class…
processing com/google/unity/ads/NativeAdLoader$3$3.class…
processing com/google/unity/ads/NativeAdLoader$4.class…
processing com/google/unity/ads/NativeExpressAd.class…
processing com/google/unity/ads/NativeExpressAd$1.class…
processing com/google/unity/ads/NativeExpressAd$1$1.class…
processing com/google/unity/ads/NativeExpressAd$2.class…
processing com/google/unity/ads/NativeExpressAd$3.class…
processing com/google/unity/ads/NativeExpressAd$4.class…
processing com/google/unity/ads/NativeExpressAd$5.class…
processing com/google/unity/ads/NativeExpressAd$6.class…
processing com/google/unity/ads/PluginUtils.class…
processing com/google/unity/ads/RewardBasedVideo.class…
processing com/google/unity/ads/RewardBasedVideo$1.class…
processing com/google/unity/ads/RewardBasedVideo$1$1.class…
processing com/google/unity/ads/RewardBasedVideo$2.class…
processing com/google/unity/ads/RewardBasedVideo$3.class…
processing com/google/unity/ads/UnityAdListener.class…
processing com/google/unity/ads/UnityCustomNativeAdListener.class…
processing com/google/unity/ads/UnityRewardBasedVideoAdListener.class…
processing archive D:\KnightTraining\KnightTraining\Temp\StagingArea\android-libraries\GooglePlay\libs.\classes.jar…
processing com/unity/purchasing/googleplay/ActivityLauncher.class…
processing com/unity/purchasing/googleplay/BillingServiceManager.class…
processing com/unity/purchasing/googleplay/BillingServiceManager$1.class…
processing com/unity/purchasing/googleplay/BillingServiceManager$1$1.class…
processing com/unity/purchasing/googleplay/BillingServiceManager$1$2.class…
processing com/unity/purchasing/googleplay/BillingServiceManager$2.class…
processing com/unity/purchasing/googleplay/BillingServiceProcessor.class…
processing com/unity/purchasing/googleplay/BuildConfig.class…
processing com/unity/purchasing/googleplay/Consts.class…
processing com/unity/purchasing/googleplay/Consts$PurchaseState.class…
processing com/unity/purchasing/googleplay/Consts$ResponseCode.class…
processing com/unity/purchasing/googleplay/GooglePlayBillingUnAvailableException.class…
processing com/unity/purchasing/googleplay/GooglePlayPurchasing.class…
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$1.class…
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$2.class…
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$3.class…
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$4.class…
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$5.class…
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$6.class…
processing com/unity/purchasing/googleplay/IActivityLauncher.class…
processing com/unity/purchasing/googleplay/IBillingServiceManager.class…
processing com/unity/purchasing/googleplay/IabException.class…
processing com/unity/purchasing/googleplay/IabHelper.class…
processing com/unity/purchasing/googleplay/IabHelper$1.class…
processing com/unity/purchasing/googleplay/IabHelper$2.class…
processing com/unity/purchasing/googleplay/IabHelper$3.class…
processing com/unity/purchasing/googleplay/IabHelper$4.class…
processing com/unity/purchasing/googleplay/IabHelper$OnConsumeFinishedListener.class…
processing com/unity/purchasing/googleplay/IabHelper$OnConsumeMultiFinishedListener.class…
processing com/unity/purchasing/googleplay/IabHelper$OnIabPurchaseFinishedListener.class…
processing com/unity/purchasing/googleplay/IabHelper$OnIabSetupFinishedListener.class…
processing com/unity/purchasing/googleplay/IabHelper$QueryInventoryFinishedListener.class…
processing com/unity/purchasing/googleplay/IabResult.class…
processing com/unity/purchasing/googleplay/Inventory.class…
processing com/unity/purchasing/googleplay/Purchase.class…
processing com/unity/purchasing/googleplay/PurchaseActivity.class…
processing com/unity/purchasing/googleplay/PurchaseFailedEvent.class…
processing com/unity/purchasing/googleplay/SkuDetails.class…
processing archive D:\KnightTraining\KnightTraining\Temp\StagingArea\android-libraries\MainLibProj\libs.\play-games-plugin-support.jar…
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource com/
ignored resource com/google/
ignored resource com/google/games/
ignored resource com/google/games/bridge/
processing com/google/games/bridge/BuildConfig.class…
processing com/google/games/bridge/NativeBridgeActivity.class…
processing com/google/games/bridge/TokenFragment.class…
processing com/google/games/bridge/TokenFragment$1.class…
processing com/google/games/bridge/TokenFragment$TokenRequest.class…
processing com/google/games/bridge/TokenPendingResult.class…
processing com/google/games/bridge/TokenResult.class…
processing archive D:\KnightTraining\KnightTraining\Temp\StagingArea\android-libraries\SamsungApps\libs.\classes.jar…
processing com/samsung/android/sdk/iap/lib/activity/BaseActivity.class…
processing com/samsung/android/sdk/iap/lib/activity/BaseActivity$1.class…
processing com/samsung/android/sdk/iap/lib/activity/InboxActivity.class…
processing com/samsung/android/sdk/iap/lib/activity/ItemActivity.class…
processing com/samsung/android/sdk/iap/lib/activity/PaymentActivity.class…
processing com/samsung/android/sdk/iap/lib/helper/SamsungIapHelper.class…
processing com/samsung/android/sdk/iap/lib/helper/SamsungIapHelper$1.class…
processing com/samsung/android/sdk/iap/lib/helper/SamsungIapHelper$2.class…
processing com/samsung/android/sdk/iap/lib/helper/SamsungIapHelpe

And I don’t have twice the same jar or aar…

Why on earth is it so difficult to implement admob?

Thanks for any help.

Well… not really solved but after a whole day struggling to get my project running again without admob, and since it’s the second attempt I’ve made with this plugin…I’d just say this:

No more admob… ever…