Unable to add Xamarin Google Play Services

I cannot add GCM to my Xamarin application. This is the output from the package console:

Adding Xamarin.GooglePlayServices.Gcm... Attempting to resolve dependency 'Xamarin.GooglePlayServices.Base (= 29.0.0.1)'. Attempting to resolve dependency 'Xamarin.GooglePlayServices.Basement (= 29.0.0.1)'. Attempting to resolve dependency 'Xamarin.Android.Support.v4 (β‰₯ 23.1.1.1)'. Attempting to resolve dependency 'Xamarin.GooglePlayServices.Measurement (= 29.0.0.1)'. Updating 'Xamarin.Android.Support.v4 23.0.1.3' to 'Xamarin.Android.Support.v4 23.3.0' failed. Unable to find a version of 'Xamarin.Forms' that is compatible with 'Xamarin.Android.Support.v4 23.3.0'. 
+5
source share
3 answers

For this version, you must install an earlier version of Xamarin.GooglePlayServices.Gcm . I had no problems with 27.0.0 .

If you need the latest version, you can do this:

  • remove the xamarin.forms nuget package
  • update all android packages to 23.3.0
  • install Xamarin.GooglePlayServices.Gcm
  • find xamarin.forms and set ignore dependencies in the parameters
  • install the latest version

Of course, you should be aware of the problems, as this is not recommended for good reasons.

+3
source

You need to update the Xamarin.Forms package. Open the packages (drop-down list) in the "Solutions" panel and right-click on Xamarin.Forms and click "Update"

enter image description here

If you use PCL, you can find this package in the PCL project (Xamarin.Forms).

If you use the Shared Asset Project, you will find this package both in the Xamarin.Android project and in Xamarin.iOS.

0
source

You need to upgrade the Android SDK platform platforms to version 26.0.2 (or equivalent).

Open the Android SDK Manager, check the update and select

"Update avaiable rev.26.0.2" and install it.

enter image description here

0
source

Source: https://habr.com/ru/post/1247681/


All Articles