Xamarin.Forms.GoogleMaps icon indicating copy to clipboard operation
Xamarin.Forms.GoogleMaps copied to clipboard

Xamarin.GooglePlayServices.Base (= 60.1142.1) Dependency Is Incompatible with Newer Plugins

Open LittleCornerDev opened this issue 6 years ago • 10 comments

VERSIONS

  • Xamarin.Forms.GoogleMaps - 3.2.1
  • Xamarin.Forms - 4.2.0.815419
  • Plugin.CloudFirestore - 2.0.0

PLATFORMS

  • [x] Android
  • [ ] iOS
  • [ ] UWP

ACTUAL BEHAVIOR

Plugin.CloudFirestore 2.0.0 adds a new timeshots enabled setting to address a new timestamp requirement in Firebase. It depends on Xamarin.GooglePlayServices.Base (>= 71.1610.0).

However, the latest Xamarin.Forms.GoogleMaps 3.2.1 requires Xamarin.GooglePlayServices.Base (= 60.1142.1).

ACTUAL SCREENSHOTS/STACKTRACE

Version conflict detected for Xamarin.GooglePlayServices.Base. Install/reference Xamarin.GooglePlayServices.Base 71.1610.0 directly to project PROJECT_NAME.Android to resolve this issue. 
 PROJECT_NAME.Android -> Plugin.CloudFirestore 2.0.0 -> Xamarin.GooglePlayServices.Base (>= 71.1610.0) 
 PROJECT_NAME.Android -> Xamarin.Forms.GoogleMaps 3.2.1 -> Xamarin.GooglePlayServices.Maps 60.1142.1 -> Xamarin.GooglePlayServices.Base (= 60.1142.1).

Installing the latest Xamarin.GooglePlayServices.Base directly just causes further dependency conflicts.

Version conflict detected for Xamarin.GooglePlayServices.Basement. Install/reference Xamarin.GooglePlayServices.Basement 71.1620.0 directly to project PROJECT_NAME.Android to resolve this issue. 
 PROJECT_NAME.Android -> Xamarin.GooglePlayServices.Base 71.1610.0 -> Xamarin.GooglePlayServices.Basement (>= 71.1620.0) 
 PROJECT_NAME.Android -> Xamarin.Forms.GoogleMaps 3.2.1 -> Xamarin.GooglePlayServices.Maps 60.1142.1 -> Xamarin.GooglePlayServices.Basement (= 60.1142.1).
 

EXPECTED BEHAVIOR

Be able to have plugins with newer Xamarin.GooglePlayServices.Base dependencies work with Xamarin.Forms.GoogleMaps.

HOW TO REPRODUCE

Try to install Plugin.CloudFirestore 2.0.0 and Xamarin.Forms.GoogleMaps 3.2.1 nugets on the same Xamarin.Android project.

LittleCornerDev avatar Sep 26 '19 23:09 LittleCornerDev

I have the same problem but related to latest Microsoft.AppCenter.Push (v. 2.5.0):

Version conflict detected for Xamarin.GooglePlayServices.Base. Install/reference Xamarin.GooglePlayServices.Base 71.1610.0 directly to project WorkingWithMaps.Android to resolve this issue.

Microsoft.AppCenter.Push 2.5.0 ->... -> Xamarin.GooglePlayServices.Base (>= 71.1610.0)

Xamarin.Forms.GoogleMaps 3.3.0 -> ... -> Xamarin.GooglePlayServices.Base (= 60.1142.1).

mikthemonster avatar Oct 28 '19 10:10 mikthemonster

Same Error here. Xamarin.Forms.Maps is still using GooglePlayServices.Base Version 60.11.42.1

Xamarin.Forms.Maps 4.4.0.991640 -> Xamarin.GooglePlayServices.Maps 60.1142.1 -> Xamarin.GooglePlayServices.Base (= 60.1142.1).

But other Nuget like Firebase are at Version 71: 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)

VisualStudio tells me to "Install/reference Xamarin.GooglePlayServices.Base 71.1610.0 directly to project DATAflor.Team.Android to resolve this issue."

When i do this, i can compile but not show a Map because then i get: "Java.Lang.NoClassDefFoundError: 'Failed resolution of: Lcom/google/android/gms/dynamic/zza;'"

What is the reason for Maps still using Version 60 instead of 71? How to solve this problem?

boris-df avatar Feb 21 '20 11:02 boris-df

@boris-df I suspect as in any opensource project - lack of maintainers or/and time. Fire a PR to try to resolve this issue :)

idchlife avatar Mar 20 '20 11:03 idchlife

This is becoming a major issue as more and more other dependencies are upgrading. I am new to C#/.NET/msbuild so am a little hesitant to file a PR to fix this myself.

Will there be any possible ramifications of upgrading the GooglePlayServices package version in https://github.com/amay077/Xamarin.Forms.GoogleMaps/blob/3f3c4820e0783398fa0c0a6a9ef2ced79cd2f6e4/Xamarin.Forms.GoogleMaps/Xamarin.Forms.GoogleMaps.Android/packages.config from "60.1142.1" to "71.1610.0"? Are there other places in the project that would require an update?

LittleCornerDev avatar Mar 28 '20 21:03 LittleCornerDev

I submitted a PR for this but haven't heard back.

https://github.com/amay077/Xamarin.Forms.GoogleMaps/pull/706

LittleCornerDev avatar Apr 15 '20 18:04 LittleCornerDev

I just finished fixing this error and came to share my solution:

Downgrade the version of Xamarin.GooglePlayServices.Base and Plugin.CloudFirestore.

  1. Uninstall Plugin.CloudFirestore
  2. Uninstall Xamarin.GooglePlayServices.Base
  3. Install Xamarin.GooglePlayServices.Base by selecting version 60.1142.1
  4. Install Plugin.CloudFirestore by selecting version 60.1142.1
  5. Install Xamarin.Forms.GoogleMaps

davidvasquezr avatar May 22 '20 02:05 davidvasquezr

Keeping the versions downgraded after 9 months is no longer feasible for our project. There are critical fixes in other libraries that have been updated and now require a higher version of GooglePlayServices. E.g., UIWebView references causing App Store build rejections as of April.

I was able to run a forked copy locally, but that introduces a set-up complexity for a team project that we would rather not introduce. As this library no longer seems to be maintained, we made the call to remove it as a dependency completely and just use Xamarin.Forms.Maps (thereby letting the iOS project use Apple Maps instead of Google Maps) going forward.

LittleCornerDev avatar Jun 01 '20 15:06 LittleCornerDev

Hey guys, any solution here?

themronion avatar Jul 22 '20 09:07 themronion

@amay077 ???

themronion avatar Jul 22 '20 09:07 themronion

Please see #729

amay077 avatar Jul 26 '20 11:07 amay077