1
votes

I'm using Xamarin.Forms.Maps and Microsoft.AppCenter.Push in my PCL project. Lately I tried to update my Push to latest version, but it's clashing with the Maps because different version of Xamarin.GooglePlayServices.Base is expected.

Severity Code Description Project File Line Suppression State Error NU1107 Version conflict detected for Xamarin.GooglePlayServices.Base. Install/reference Xamarin.GooglePlayServices.Base 71.1610.0 directly to project XXX.Android to resolve this issue.

XXX.Android -> Microsoft.AppCenter.Push 2.5.0 -> Xamarin.Firebase.Messaging 71.1740.0 -> Xamarin.Firebase.Iid 71.1710.0 -> Xamarin.Firebase.Iid.Interop 71.1601.0 -> Xamarin.GooglePlayServices.Base (>= 71.1610.0)

XXX.Android -> Xamarin.Forms.Maps 4.3.0.947036 -> Xamarin.GooglePlayServices.Maps 60.1142.1 -> Xamarin.GooglePlayServices.Base (= 60.1142.1).

Push is expecting version 71 while Maps is expecting version 60. May I know how to resolve this and I'm curious why cannot the Maps use the later version? Is it not backward compatible?

Thank you.

2

2 Answers

0
votes

Yes, I have reproduce this problem as you said.

Accoriding to the error log, we know that the problem is that though the Xamarin.Forms.Maps Nuget have been updated to a newer version, but the package (Xamarin.GooglePlayServices.Base) in this nuget hasn't been updated synchronously to the later version( 71.1610.0). It should be an issue of this Nuget. And we can report it as a bug here: https://github.com/xamarin/Xamarin.Forms/issues

For now, in order to keep the code working properly,what we can do is keep the two Nuget versions in sync. Just install nuget Microsoft.AppCenter.Push 2.1.1 and nuget Xamarin.Forms.Maps 4.3.0.947036.

0
votes

EDITED

If you read the comments, there is one saying that you can install dependencies manually.

In this case, by visiting the NuGet repo for Xamarin.Forms.Maps you can see in the dependencies list that it requires Xamarin.GooglePlayServices.Maps.

Just make sure you already have dependencies installed, or simply add them to your Android solution (I added also Xamarin.Android.Support.v7.AppCompat).

By following these steps, I'm able to run both Xamarin.Forms.Maps (v4.4.0.991477) and Microsoft.AppCenter.Push (v2.6.4).


There is an issue on the GitHub relate repo and seems to be fixed.

Refer to following link please

NuGet version conflict between Xamarin.Froms.Maps and Microsoft.AppCenter.Push

You can check the whole evolution of the issue.