Can,t connect Unity Ads with AdMob Mediation the Adapter will not instantiate

1,407 views
Skip to first unread message

Nemanja Mitrovcan

unread,
Feb 24, 2017, 3:30:07 AM2/24/17
to Google Mobile Ads SDK Developers
I em using the unity ads 2.0.2 for Android Studio, integrated it correctly and it works by itself.
But when i added the UnityAdsAdapter so AdMob can display unity ads i get en error :
02-24 09:08:46.432 16982-17498/com.midva.HiddenObjectNewYork I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.ads.mediation.unity.UnityAdapter>
02-24 09:08:46.482 16982-17498/com.midva.HiddenObjectNewYork W/Ads: Could not instantiate mediation adapter: com.google.ads.mediation.unity.UnityAdapter. com.google.ads.mediation.unity.UnityAdapter
2-24 09:08:46.612 16982-17498/com.midva.HiddenObjectNewYork W/Ads: Fail to instantiate adapter com.google.ads.mediation.unity.UnityAdapter
                                                                    android.os.RemoteException
                                                                        at com.google.android.gms.internal.zzel.zzag(Unknown Source)
                                                                        at com.google.android.gms.internal.zzel.zzae(Unknown Source)
                                                                        at com.google.android.gms.internal.zzem$zza.onTransact(Unknown Source)
                                                                        at android.os.Binder.transact(Binder.java:395)
                                                                        at com.google.android.gms.ads.internal.mediation.client.d.a(:com.google.android.gms.DynamiteModulesA:94)
                                                                        at com.google.android.gms.ads.internal.reward.c.b(:com.google.android.gms.DynamiteModulesA:229)
                                                                        at com.google.android.gms.ads.internal.reward.mediation.k.a(:com.google.android.gms.DynamiteModulesA:1140)
                                                                        at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms.DynamiteModulesA:19)
                                                                        at com.google.android.gms.ads.internal.util.ab.call(:com.google.android.gms.DynamiteModulesA:1055)
                                                                        at com.google.android.gms.ads.internal.util.ac.run(:com.google.android.gms.DynamiteModulesA:75)
                                                                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
                                                                        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                        at java.lang.Thread.run(Thread.java:818)

please help !!!

Joshua Lagonera (Mobile Ads SDK Team)

unread,
Feb 24, 2017, 4:15:27 AM2/24/17
to Google Mobile Ads SDK Developers
Hi Nemanja,

You most likely have integrated the SDK and the adapter incorrectly, as indicated by the "Could not instantiate mediation adapter:" error. 

That said, to properly mediate third-party Ad Networks with AdMob, you have to integrate both the SDKs and/or Adapters (depending on the Ad Network) of each third-party Ad Network you wish to mediate with.
You can visit our official documentation site on how to Mediate Ad Networks for Android, as well as the supported Third-party Ad Networks, which contains helpful links on how to properly mediate with AdMob, as well as links to their respective SDKs and Adapters.

Additionally, I have made this sample app, which has mediation for UnityAds already setup, that you can use as reference. 

Hope this would prove to be useful to you.

Regards,
Joshua Lagonera
Mobile Ads SDK Team

Nemanja Mitrovcan

unread,
Feb 24, 2017, 5:27:26 AM2/24/17
to Google Mobile Ads SDK Developers
The only difference that i can see is that we are not using firebase, because we wanted to add this to our game that already has AdMob integrated using GooglePlayServices.
The thing thats bugging me is that we successfully did this for Chartboost, AdColony and Vungle and only unity doesn't want to work.
And its working in the example project.

Joshua Lagonera (Mobile Ads SDK Team)

unread,
Feb 24, 2017, 5:41:09 AM2/24/17
to Google Mobile Ads SDK Developers
Hi Nemanja,

There should be no difference in using the SDK via Firebase (com.google.firebase:firebase-ads:10.2.0) vs using the SDK via Google Play Services (com.google.android.gms:play-services-ads:10.2.0).

That said, I would just like to confirm that your issue has been resolved, correct?
If not, then you can send us a sample project on where you can replicate the error so we may investigate further.

Regards,
Joshua Lagonera
Mobile Ads SDK Team

Nemanja Mitrovcan

unread,
Feb 24, 2017, 5:54:46 AM2/24/17
to Google Mobile Ads SDK Developers
hmmm we are using com.google.android.gms:play-services-ads:8.1.0 maybe thats the problem ???

Nemanja Mitrovcan

unread,
Feb 24, 2017, 7:30:37 AM2/24/17
to Google Mobile Ads SDK Developers
yes the problem whose that we where using 8.1.0 version of play-services know it works :D
Reply all
Reply to author
Forward
0 new messages