- Home /
Admob and GooglePlayGames not working together
I am using the following plugins in my Unity android game:
1) Admob
2) Google Play Games
3) Unity IAP
I use the latest versions of all plugins. Unity IAP plugin is not causing any problem and is working fine. Google Play Games do work if there is no Admob. And Admob works when there is no Google Play Games. But Admob and GooglePlayGames is not working together. I am getting the following error when I try to build my Unity project:
CommandInvokationFailure: Unable to convert classes into dex format. C:\Program Files\Android\Android Studio\jre\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:\Users\HP\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/google/android/gms/ads/identifier/AdvertisingIdClient; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient$Info; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient$zza; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/ads/identifier/zza; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/ads/identifier/zzb; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/ads/identifier/zzc; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/ItemListIntents; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/NoteIntents; Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/ReserveIntents;
UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.RuntimeException: Translation has been interrupted at com.android.dx.command.dexer.Main.processAllFiles(Main.java:614) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:310) at com.android.dx.command.dexer.Main.runDx(Main.java:288) at com.android.dx.command.dexer.Main.main(Main.java:244) at com.android.dx.command.Main.main(Main.java:95) 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:130) Caused by: java.lang.InterruptedException: Too many errors at com.android.dx.command.dexer.Main.processAllFiles(Main.java:606) ... 9 more ] stdout[ processing archive C:\Users\Public\Documents\Unity Projects\Shapes\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 C:\Users\Public\Documents\Unity Projects\Shapes\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/GooglePlayPurchasing$7.class... processing com/unity/purchasing/googleplay/GooglePlayPurchasing$8.class... processing com/unity/purchasing/googleplay/GooglePlayPurchasing$Features.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$2$1.class... processing com/unity/purchasing/googleplay/IabHelper$3.class... processing com/unity/purchasing/googleplay/IabHelper$3$1.class... processing com/unity/purchasing/googleplay/IabHelper$4.class... processing com/unity/purchasing/googleplay/IabHelper$5.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 com/unity/purchasing/googleplay/VRPurchaseActivity.class... processing archive C:\Users\Public\Documents\Unity Projects\Shapes\Temp\StagingArea\android-libraries\admoblib-release\libs.\classes.jar... processing com/admob/plugin/AdmobHandler.class... processing com/admob/plugin/AdmobListenerProxy.class... processing com/admob/plugin/AdmobNativeAd.class... processing com/admob/plugin/AdmobNativeAd$1.class... processing com/admob/plugin/AdmobNativeAd$2.class... processing com/admob/plugin/AdmobNativeAd$3.class... processing com/admob/plugin/AdmobNativeAd$4.class... processing com/admob/plugin/AdmobUnityPlugin.class... processing com/admob/plugin/AdmobUnityPlugin$1.class... processing com/admob/plugin/BannerHandler.class... processing com/admob/plugin/BannerHandler$1.class... processing com/admob/plugin/BannerHandler$2.class... processing com/admob/plugin/BannerHandler$3.class... processing com/admob/plugin/BannerHandler$BannerPosition.class... processing com/admob/plugin/BuildConfig.class... processing com/admob/plugin/ClassicBannerHandler.class... processing com/admob/plugin/ClassicBannerHandler$1.class... processing com/admob/plugin/IAdmobListener.class... processing com/admob/plugin/IAdmobNativeAdListener.class... processing com/admob/plugin/InterstitialHandler.class... processing com/admob/plugin/InterstitialHandler$1.class... processing com/admob/plugin/InterstitialHandler$2.class... processing com/admob/plugin/InterstitialHandler$3.class... processing com/admob/plugin/NativeBannerHandler.class... processing com/admob/plugin/NativeBannerHandler$1.class... processing com/admob/plugin/VideoHandler.class... processing com/admob/plugin/VideoHandler$1.class... processing com/admob/plugin/VideoHandler$2.class... processing com/admob/plugin/VideoHandler$3.class... processing archive C:\Users\Public\Documents\Unity Projects\Shapes\Temp\StagingArea\android-libraries\com.android.support.support-compat-25.2.0\libs.\classes.jar... processing android/support/compat/BuildConfig.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoJellyBeanImpl.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoJellyBeanMr2Impl.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBean.class... processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBeanMr2.class... processing android/support/v4/animation/AnimatorCompatHelper.class... processing android/support/v4/animation/AnimatorListenerCompat.class... processing android/support/v4/animation/AnimatorProvider.class... processing android/support/v4/animation/AnimatorUpdateListenerCompat.class... processing android/support/v4/animation/GingerbreadAnimatorCompatProvider.class... processing android/support/v4/animation/GingerbreadAnimatorCompatProvider$GingerbreadFloatValueAnimator.class... processing android/support/v4/animation/GingerbreadAnimatorCompatProvider$GingerbreadFloatValueAnimator$1.class... processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider.class... processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider$AnimatorListenerCompatWrapper.class... processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider$HoneycombValueAnimatorCompat.class... processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider$HoneycombValueAnimatorCompat$1.class... processing android/support/v4/animation/ValueAnimatorCompat.class... processing android/support/v4/app/ActivityCompat.class... processing android/support/v4/app/ActivityCompat$1.class... processing android/support/v4/app/ActivityCompat$OnRequestPermissionsResultCallback.class... processing android/support/v4/app/ActivityCompat$SharedElementCallback21Impl.class... processing android/support/v4/app/ActivityCompat$SharedElementCallback23Impl.class... processing android/support/v4/app/ActivityCompat$SharedElementCallback23Impl$1.class... processing android/support/v4/app/ActivityCompatApi21.class... processing android/support/v4/app/ActivityCompatApi21$SharedElementCallback21.class... processing android/support/v4/app/ActivityCompatApi21$SharedElementCallbackImpl.class... processing android/support/v4/app/ActivityCompatApi22.class... processing android/support/v4/app/ActivityCompatApi23.class... processing android/support/v4/app/ActivityCompatApi23$OnSharedElementsReadyListenerBridge.class... processing android/support/v4/app/ActivityCompatApi23$RequestPermissionsRequestCodeValidator.class... processing android/support/v4/app/ActivityCompatApi23$SharedElementCallback23.class... processing android/support/v4/app/ActivityCompatApi23$SharedElementCallbackImpl.class... processing android/support/v4/app/ActivityCompatApi23$SharedElementCallbackImpl$1.class... processing android/support/v4/app/ActivityCompatHoneycomb.class... processing android/support/v4/app/ActivityCompatJB.class... processing android/support/v4/app/ActivityManagerCompat.class... processing android/support/v4/app/ActivityManagerCompatKitKat.class... processing android/support/v4/app/ActivityOptionsCompat.class... processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImpl21.class... processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImpl23.class... processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImpl24.class... processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImplJB.class... processing android/support/v4/app/ActivityOptionsCompat21.class... processing android/support/v4/app/ActivityOptionsCompat23.class... processing android/support/v4/app/ActivityOptionsCompat24.class... processing android/support/v4/app/ActivityOptionsCompatJB.class... processing android/support/v4/app/AppOpsManagerCompat.class... processing android/support/v4/app/AppOpsManagerCompat$AppOpsManager23.class... processing android/support/v4/app/AppOpsManagerCompat$AppOpsManagerImpl.class... processing android/support/v4/app/AppOpsManagerCompat23.class... processing android/support/v4/app/BundleCompat.class... processing android/support/v4/app/BundleCompatGingerbread.class... processing android/support/v4/app/BundleCompatJellybeanMR2.class... processing android/support/v4/app/BundleUtil.class... processing android/support/v4/app/INotificationSideChannel.class... processing android/support/v4/app/INotificationSideChannel$Stub.class... processing android/support/v4/app/INotificationSideChannel$Stub$Proxy.class... processing android/support/v4/app/NotificationBuilderWithActions.class... processing android/support/v4/app/NotificationBuilderWithBuilderAccessor.class... processing android/support/v4/app/NotificationCompat.class... processing android/support/v4/app/NotificationCompat$Action.class... processing android/support/v4/app/NotificationCompat$Action$1.class... processing android/support/v4/app/NotificationCompat$Action$Builder.class... processing android/support/v4/app/NotificationCompat$Action$Extender.class... processing android/support/v4/app/NotificationCompat$Action$WearableExtender.class... processing android/support/v4/app/NotificationCompat$BigPictureStyle.class... processing android/support/v4/app/NotificationCompat$BigTextStyle.class... processing android/support/v4/app/NotificationCompat$Builder.class... processing android/support/v4/app/NotificationCompat$BuilderExtender.class... processing android/support/v4/app/NotificationCompat$CarExtender.class... processing android/support/v4/app/NotificationCompat$CarExtender$UnreadConversation.class... processing android/support/v4/app/NotificationCompat$CarExtender$UnreadConversation$1.class... processing android/support/v4/app/NotificationCompat$CarExtender$UnreadConversation$Builder.class... processing android/support/v4/app/NotificationCompat$Extender.class... processing android/support/v4/app/NotificationCompat$InboxStyle.class... processing android/support/v4/app/NotificationCompat$MessagingStyle.class... processing android/support/v4/app/NotificationCompat$MessagingStyle$Message.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImpl.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplApi20.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplApi21.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplApi24.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplBase.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplHoneycomb.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplIceCreamSandwich.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplJellybean.class... processing android/support/v4/app/NotificationCompat$NotificationCompatImplKitKat.class... processing android/support/v4/app/NotificationCompat$Style.class... processing android/support/v4/app/NotificationCompat$WearableExtender.class... processing android/support/v4/app/NotificationCompatApi20.class... processing android/support/v4/app/NotificationCompatApi20$Builder.class... processing android/support/v4/app/NotificationCompatApi21.class... processing android/support/v4/app/NotificationCompatApi21$Builder.class... processing android/support/v4/app/NotificationCompatApi23.class... processing android/support/v4/app/NotificationCompatApi24.class... processing android/support/v4/app/NotificationCompatApi24$Bu
I have seen similar issues posted in stackoverflow and GitHub. However, the solution mentioned there didn't workout for me.
Could someone please help me fix this issue? Thanks in advance!
Answer by liortal · Sep 29, 2018 at 07:59 PM
From the error message, it appears you have multiple versions of some Google play services libraries in your project.
Try to find them by looking for files with names that start with play-services.
You should make sure that you have only 1 copy from each library. Also, make sure that all libraries are from the same version - do not mix different versions.
Your answer
Follow this Question
Related Questions
Game crashes on start up after implementing Admob 0 Answers
Android - Error building Player: CommandInvokationFailure: Failed to re-package resources 0 Answers
GooglePlayGames Scoreboard doesn't display when called 0 Answers
IOException : Failed to Move File / Directory 4 Answers
CommandInvokationFailure: Unable to convert classes into dex format - Unity 1 Answer