amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
544 stars 345 forks source link

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

Open LittleCornerDev opened 4 years ago

LittleCornerDev commented 4 years ago

VERSIONS

PLATFORMS

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.

mikthemonster commented 4 years ago

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).

boris-df commented 4 years ago

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?

idchlife commented 4 years ago

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

LittleCornerDev commented 4 years ago

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 commented 4 years ago

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

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

davidvasquezr commented 4 years ago

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
LittleCornerDev commented 4 years ago

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.

themronion commented 3 years ago

Hey guys, any solution here?

themronion commented 3 years ago

@amay077 ???

amay077 commented 3 years ago

Please see #729