dmanning23 / AdMobBuddy

Library for viewing AdMob ads into a Xamarin.Android, Xamarin.iOS, and MonoGame apps
MIT License
28 stars 13 forks source link

Getting unable to resolve interface type #13

Open luqman-hussain opened 1 year ago

luqman-hussain commented 1 year ago

When using for Interstitial ads getting as:

IAdManager ads = new AdMobAdapter(mainActivity,
interstitialAdID: _interstialTestAd);

 ads.DisplayInterstitialAd();

Getting:

Unable to resolve interface type 'Android.Gms.Ads.IOnUserEarnedRewardListener'. Are you missing an assembly reference?  
Unable to resolve interface type 'Android.Gms.Ads.Initialization.IOnInitializationCompleteListener'

Am i missing something?

dmanning23 commented 1 year ago

I'll take a look at it. It probably has to do with the version of the Xamarin binding library... what version of the Xamarin.GooglePlayServices.Ads.Lite nuget package are you using?

Google did a huge refactor of the AdMob android package last year, and Microsoft is still trying to fix their wrapper last time I checked. I've been putting off updating this library because their latest versions of the binding library have been broken.

luqman-hussain commented 1 year ago

hiya. thanks. i tried multiple different versions of Xamarin.GooglePlayServices.Ads.Lite . even older ones . didnt seem to work with any. If you can check which most up to date one it definitely works with that would be ideal.