0
votes

I want to develop Chat Application on Xamarin Cross Platform using Firebase Cloud Messaging. But Xamarin.Forms 2.3.3.180 has dependency to Xamarin.Android.Support.v4 23.3.0 and Xamarin.GooglePlayServices.Basement 32.961 has a dependency to Xamarin.Android.Support.v4 24.2.1.

How can this be resolved?

Or

Is there another way to do it?

2

2 Answers

0
votes

This can be resolved in a couple of ways

  1. Use a version of Firebase that has the same Android Support dependency
  2. Go to Xamarin.Forms github, check out the repository and upgrade this dependency. Then build your own version or make a Pull Request and wait for it to be released
  3. Don't use Firebase directly in your App, but use your own backend, which in turn talks to Firebase.
  4. Wait for the Xamarin.Forms team to fix this dependency

Which one you pick is entirely up to you. It is your task to weigh the pros and cons about these approaches. Some take more time than others.

I personally think, either 1. or 2. might be your best options. Xamarin.Forms is open source and you can do whatever you want with the source. Including upgrading dependencies etc. Of course Pull Requests for the project are welcome and I encourage you to make one if you have a fix that benefits all others. Make sure to talk to the Xamarin.Forms team before you start a big task, so you don't waste your time doing something that they don't want or is not on the roadmap.

0
votes

The options from Cheesebaron are a good summary. I'm assuming you're using Xamarin.Firebase.Messaging.

If you want to go with option #1, the Xamarin.Firebase.Messaging component version 32.940.0-beta3 is the most recent one whose dependencies still allow the various Xamarin.Android.Support 23.3.0 libraries that Xamarin.Forms needs. In order to see the 32.940.0-beta3 version, you'll have to enable "Prerelease" versions.

While it is marked as a beta release, it has worked for me, and hopefully Forms will allow upgrading the Android support libraries soon...