Error when trying to add nugget Xamarin.GooglePlayServices.Ads

Wondered if anyone could give advice please as not sure what to do have tried clean, build and restart googled for hours and have have updated nuggets. I code just for fun and have been doing the same app for 2 years now its very big but now have it a brick :( when i try to install nugget Xamarin.GooglePlayServices.Ads i get the following errors, was thinking of removing netstandard2.0 but it doesn't want to go so not sure

It's a cross platform app on ios android and windows

Error NU1202 Package Xamarin.GooglePlayServices.Ads 71.1720.1 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Xamarin.GooglePlayServices.Ads 71.1720.1 supports: monoandroid90 (MonoAndroid,Version=v9.0)

Error NU1107 Version conflict detected for Xamarin.GooglePlayServices.Basement. Install/reference Xamarin.GooglePlayServices.Basement 71.1620.0 directly to project Digital.Android to resolve this issue.
Digital.Android -> Xamarin.GooglePlayServices.Ads 71.1720.1 -> Xamarin.GooglePlayServices.Basement (>= 71.1620.0)
Digital.Android -> Xamarin.Forms.Maps 4.2.0.709249 -> Xamarin.GooglePlayServices.Maps 60.1142.1 -> Xamarin.GooglePlayServices.Basement (= 60.1142.1). Digital.Android

Error NU1202 Package Xamarin.GooglePlayServices.Ads 71.1720.1 is not compatible with uap10.0.16299 (UAP,Version=v10.0.16299) / win10-x86-aot. Package Xamarin.GooglePlayServices.Ads 71.1720.1 supports: monoandroid90 (MonoAndroid,Version=v9.0)

Best Answers

  • Jason1975Jason1975 ✭✭
    Accepted Answer

    well im still testing but yes i think so i downgraded Xamarin.GooglePlayServices.Ads version 60 for android and did
    Xamarin.Google.iOS.MobileAds as Xamarin.Firebase.iOS.AdMob version 7 also gave me some errors and then just created a custom render for each with the help of this site https://www.c-sharpcorner.com/article/google-admob-display-ads-in-xamarin-forms/ works currently on android still testing ios thanks

  • Jason1975Jason1975 ✭✭
    Accepted Answer

    On further investigation it looked that my original issue was due to xamarin.forms.maps as after i removed i was then able to add Xamarin.GooglePlayServices.Ads version 71 and then replaced xamarin.forms.maps with the google version unfortunately Google was moaning to much for me to change my code that out of laziness i went to back to xamarin.forms.maps as it liked my code and im just going to stick with Xamarin.GooglePlayServices.Ads 60 :) also my original issue was i didnt realize it was a separate nugget for each PCL and so i was trying to install Xamarin.GooglePlayServices.Ads for all versions which i now believe is a mistake on my part

Answers

  • Jason1975Jason1975 Member ✭✭

    I have tried a different computer and and uninstalled all my packages and created a new project but still get the same error :(

    So assume perhaps i have incorrectly setup am i meant to change from netstandard2.0 to monoandroid90 andy advise or how to would be great :)

  • Jason1975Jason1975 Member ✭✭

    I thought that the answer might be to edit my .cproject to netstandard2.0;Xamarin.iOS10;MonoAndroid90;uap10.0.17763 instead of netstandard2.0

    But it doesnt like that either :(

  • Jason1975Jason1975 Member ✭✭

    Ok might have found a solution going with installing Xamarin.GooglePlayServices.Ads.Lite version 60 for android and Xamarin.Firebase.iOS.AdMob version 7 for ios

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Did you solved your issue? If you solve it, please mark your reply as answer, it will help others who have similar issue.

  • Jason1975Jason1975 Member ✭✭
    Accepted Answer

    well im still testing but yes i think so i downgraded Xamarin.GooglePlayServices.Ads version 60 for android and did
    Xamarin.Google.iOS.MobileAds as Xamarin.Firebase.iOS.AdMob version 7 also gave me some errors and then just created a custom render for each with the help of this site https://www.c-sharpcorner.com/article/google-admob-display-ads-in-xamarin-forms/ works currently on android still testing ios thanks

  • Jason1975Jason1975 Member ✭✭
    Accepted Answer

    On further investigation it looked that my original issue was due to xamarin.forms.maps as after i removed i was then able to add Xamarin.GooglePlayServices.Ads version 71 and then replaced xamarin.forms.maps with the google version unfortunately Google was moaning to much for me to change my code that out of laziness i went to back to xamarin.forms.maps as it liked my code and im just going to stick with Xamarin.GooglePlayServices.Ads 60 :) also my original issue was i didnt realize it was a separate nugget for each PCL and so i was trying to install Xamarin.GooglePlayServices.Ads for all versions which i now believe is a mistake on my part

Sign In or Register to comment.